Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table v8 expanding - incorrect state of parent checkbox when selecting subrows #5620

Open
2 tasks done
odini85 opened this issue Jun 20, 2024 · 3 comments
Open
2 tasks done

Comments

@odini85
Copy link

odini85 commented Jun 20, 2024

TanStack Table version

8.17.3

Framework/Library version

18.2.0

Describe the bug and the steps to reproduce it

The closed issue #4720 has potential bugs.

It can be verified according to the following steps.

1. Apply the code guided in issue #4720 to the sample code below:

https://tanstack.com/table/v8/docs/framework/react/examples/expanding

<IndeterminateCheckbox {...{ checked: row.getIsSelected() || row.getIsAllSubRowsSelected(), indeterminate: row.getIsSomeSelected(), onChange: row.getToggleSelectedHandler(), }} />

2. Implement this guided sample code into the sample code and conduct tests.

3. The potential bugs identified are as follows:

if the parent is checked and all children are checked, unchecking one child does not change the status of the parent checkbox.

issue.1.mov

If all children are individually checked, the parent's checkbox status changes to checked. However, if the parent checkbox is then unchecked, it does not uncheck all the children.

issue.2.mov

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://codesandbox.io/p/devbox/jolly-nightingale-k9tx7h

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.
@Pukowka
Copy link

Pukowka commented Jul 22, 2024

Does anyone have some workaround?

@wellingtonngallo
Copy link

Up

@wellingtonngallo
Copy link

@odini85 you solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants