Checkbox inside filter Popover does not work
Describe the bug Checkboxes do not work in filter.
To Reproduce Steps to reproduce the behavior:
- add a checkbox as a filter component in columns defintion.
- add a state to control the checkbox
- Click on check box
- nothing happens...
Expected behavior The checkbox should work properly
Screenshots
Desktop (please complete the following information):
- OS: Windows 11
- Browser Chrome :Version 119.0.6045.160 (Official Build) (64-bit)
- Version Datatable version ^7.1.7
Additional context Since the filter uses a Mantine PopOver, i reproduced the error with a simple popover and a checkbox somewhere else. To reproduce the error, just add (like in the datatable code pase) add onClick={(e) => e.preventDefault()}. I think this is the source of the problem. line of code
Thanks a lot for bringing this to my attention. The issue should be fixed in the latest version, check the age column filter on this example: https://icflorescu.github.io/mantine-datatable/examples/searching-and-filtering.
Can't remember exactly, but I assume the onClick={(e) => e.preventDefault()} was there to prevent accidentally triggering the sort when clicking inside the popup. Should have used .stopPropagation() instead.
Awsome. You are very, welcome. Thank you for sharing this awesome library.