Custom function for selecting all rows. #4603
Unanswered
husnainali92
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Hi, i bumped to this issue as well, due to my component passing boolean of checked instead of event it looks like the ideal fix is to make the component passes the event but here is the work around because it try to access e.target.checked, you can create such structure, passes it to function that returned by getToggleAllRowsSelectedHandler
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Just don't use the get handlers APIs. They are just shortcuts for the toggle function APIs. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi I'm using react aria checkbox for selection.
Their onChange method doesn't send the native event when onChange triggers they only send isSelected (e.target.checked) flag.
But getToggleAllRowsSelectedHandler and getToggleAllPageRowsSelectedHandler expect event.
My app crashed when I try to select all and react table was reading checked property. Screenshot attached.
The weird thing is single row selection is working fine but select all not working. They both have different function but both functions are expecting event.
Here is the codesandbox link to see
Beta Was this translation helpful? Give feedback.
All reactions