Tencent / Tencent/tdesign-react
[Table] onSelectChange 的参数 selectedRowData 在取消某一页的全部选择后返回[],而不是剩下页面已经选择的数据
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 965
- Forks
- 373
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 17
Description
tdesign-react 版本
1.10.0
重现链接
重现步骤
Table 组件设置了 {
colKey: 'row-select',
type: 'multiple'
}
有两页,第一页、第二页都选择了全部,回到第一页取消选择全部(通过表头的checkbox取消选择全部),剩下第2页的选项,onSelectChange 的参数 value 是第二页数据的 id,而selectedRowData是[],而不是第二页的数据
期望结果
期望selectedRowData返回的是第2页的数据
实际结果
实际selectedRowData返回的是[]
框架版本
No response
浏览器版本
No response
系统版本
No response
Node版本
18.16.1
补充说明
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior in the Table component using the paginated-table demo linked in the issue. Trace the onSelectChange callback when all rows on page one are deselected after both pages were selected. Done means value still contains page two's selected IDs and selectedRowData contains the corresponding page-two data instead of [].
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100