[React] Row selection does not reset after upgrading from v7 to v8
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- react, typescript
- 领域
- frontend
调研方向
从链接的 CodeSandbox 复现开始,将文档记录的 v7 中 autoResetSelectedRows 的行为与 v8 的选择行为进行比较。确认 refresh-data 操作之后会发生什么,然后检查 v8 的 row-selection 入口点,以确定预期的重置还是配置选项才是设计意图;当复现出的选择行为与达成一致的结果相符时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
Hello,
first, thank you for your awesome job, v8 is by far better than v7, I appreciate all the effort you put on it.
I'm pointing this issue as a Bug because I couldn't find any information on the documentation about it, so if it is not a bug, my apologies.
In v7, there was the option autoResetSelectedRows that (it was set by default to true) resets the selected rows whenever the data changes.
In v8, this option is not there anymore and the default behaviour is exactly the opposite.
I would like to know, first, if that was intended, second, if there are plans to restore the configuration option autoResetSelectedRows and when?
A reproducible repo could be found on your documentation pages: https://2llvty.sse.codesandbox.io
Your minimal, reproducible example
https://2llvty.sse.codesandbox.io
Steps to reproduce
Open https://2llvty.sse.codesandbox.io
Select the first 2 rows (checkbox)
Press on refresh data (button) at the bottom
Result:
Data is refreshed and the rows remain selected, even though data did change.
Expected behavior
After data was refreshed, the selection should have been reset, same as it was in v7.
Or there is an option like autoResetSelectedRows that I could set in order to obtain the same behaviour as in v7.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- Os: [macOS] - Browser: [Chrome, Firefox]
react-table version
"@tanstack/react-table": "^8.5.22",
TypeScript version
v4.7.3
Additional context
No response
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
- 主要语言
- TypeScript
- 星标
- 28.4k
- 派生
- 3.6k
- 平均合并
- 1 天 1 小时
- 30 天内合并 PR
- 7
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/table 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 78/100
-
难度 5/5 一周以上 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 78/100
-
难度 5/5 一周以上 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 55/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
bcgov/bc-wallet-mobile#4761 · 1 条评论 ·
-
external-issue to-triage
难度 2/5 1-3 小时 新手友好度 88/100
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100
-
难度 2/5 1-3 小时 新手友好度 82/100
-
refactor
难度 2/5 1-3 小时 新手友好度 84/100