Function getIsSomeSelected() return false when has one child
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28.4k
- Forks
- 3.6k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 10
Description
TanStack Table version
8.20.5
Framework/Library version
React 17.0.2
Describe the bug and the steps to reproduce it
Description bug
When a parent has only one node and this node is selected, function getIsSomeSelected() return all as false
Additional
See that in my object, subRow has only one item, the problem only occurs in this case. If you add one more item totaling 2 children, it works correctly
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://codesandbox.io/p/devbox/clhnxy?migrateFrom=yldcnv
Screenshots or Videos (Optional)
Do you intend to try to help solve this bug with your own PR?
None
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.
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 running the linked CodeSandbox reproduction and tracing getIsSomeSelected() for a parent with exactly one selected child. Confirm the behavior against the same case with two children, then identify the relevant selection logic and add coverage showing the expected result for a single-child parent.
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
- 42/100