[Analytical Table]: Ignore selection for disabled rows when selectSubRows is true #5676
Unanswered
shehabshalan1
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
We are currently using the Analytical Table component to render a tree table. A parent or a child row can be disabled based on certain conditions. For this we utilize
useRowDisableSelection
hook. We also useuseIndeterminateRowSelection
withreactTableOptions={{ selectSubRows: true }}
.I noticed that when selecting a parent, the disabled rows in the children are also selected which should not be the case. Ideally a row can be selected if it is not disabled.
I made a stackblitz here to show this behavior and video below as well.
example.disabled.row.selection.mp4
A workaround I tried is to toggle the disabled row selection off again when parent row is selected but this workaround only works if the parent is already expanded.
Beta Was this translation helpful? Give feedback.
All reactions