datagrid必须有ID才能跨页多选,且通过 getCheckItems() 获取已选中的行数据项错误
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 678
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 7
Description
datagrid 官方示例中,可以进行跨页多选,第一页选择第一条,第二页选择第二条,切换回第一页,第一条仍然是被选中的。
通过多次尝试,发现只有数据中存在id列时才能正确触发跨页多选。我的数据表中索引是 uid,并不是 id 。通过将数据 uid 字段改为 id 可以正常触发跨页多选。如果没有 id 列,则在选中任意行时,切换到其他页,这些行仍然是被选中的。
通过getCheckItems() 获取选中项时,加入第一页选中了3、4条,第二页选中了4、5条,当前在第二页,则输出的会是第二页的 3、4、5 条。如果在第一页,则输出第一页的3、4、5条。



Contributor guide
No contributing guide indexed for this repository
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
Reproduce the datagrid behavior by selecting rows across pages with an id field and with uid instead, then inspect the datagrid selection implementation and getCheckItems() entry point. Done means cross-page selections remain correct with uid and getCheckItems() returns all selected rows regardless of the current page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100