imballinst / react-bs-datatable

Bootstrap datatable without jQuery. Features include: filter, sort, pagination, checkbox, and control customization.
https://imballinst.github.io/react-bs-datatable
MIT License
59 stars 20 forks source link

Feature Request: Clear checkbox state across data changes #173

Closed Thomas-Boi closed 1 year ago

Thomas-Boi commented 1 year ago

Hello again imballinst 👋 ,

Thank you for your time and sorry to bother you again. I run into a minor set back with the clear feature of createBulkCheckboxClickHandler. My project uses pagination from the backend and your table works great with selecting across pages. However, when clearing all of them, the checkboxes are not clear across pages. You can see the sandbox for more details. To replicate:

I tried to look for a place to reset the checkbox.checkbox.selected to new Set() but I couldn't find a clean way to do it. I'd appreciate your help on this 😄 . Let me know if I can assist with this in any way.

Thomas-Boi commented 1 year ago

I just added #174 which might do the job. I'm new to the code base so feel free to edit as you'd like.

imballinst commented 1 year ago

Thanks @Thomas-Boi for creating the PR! That's a good point, revisiting the code and looking at the PR now... 👀

imballinst commented 1 year ago

Released in https://www.npmjs.com/package/react-bs-datatable/v/3.10.0.