ant-design / ant-design/pro-components
🐛[BUG]Tabs 和 ProForm.useWatch 同时使用时无法正常监听
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
### 🐛 bug 描述
1.第一个`TabItem` 中,formRef 在`ProTable` 中,两个`Select` 搜索条件联动,当使用 useWatch 能正常触发。
2.当多个`TabItem` 切换时,`useWatch`会失效。
Tabs 设置了
```JavaScript
;
```
### 📷 复现步骤
### 🏞 期望结果
`Tabs` 组价设置 `destroyInactiveTabPane` 之后,切换销毁`children`。当再次切换时,能触发`useWatch`。
### 💻 复现代码
### © 版本信息
- ProComponents 版本: [2.6.43]
- Antd 版本: [5.13.1]
- umi 版本
- 浏览器环境
- 开发环境 [e.g. mac OS]
### 🚑 其他信息
Contributor guide
Research direction
Start by reproducing the interaction between Tabs with destroyInactiveTabPane, ProForm.useWatch, and the ProTable formRef using the issue's described linked Select fields. Compare useWatch behavior before and after switching between multiple tabs and destroying an inactive pane. Done means useWatch triggers correctly when returning to a tab and its children are recreated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100