icflorescu / mantine-datatable

The table component for your Mantine data-rich applications, supporting asynchronous data loading, column sorting, custom cell data rendering, context menus, nesting, Gmail-style batch row selection, dark theme, and more.
https://icflorescu.github.io/mantine-datatable/
MIT License
949 stars 68 forks source link

Select filter doesn't fire onChange event when using laptop's touchpad #595

Open ilko-nikolov opened 6 months ago

ilko-nikolov commented 6 months ago

Description of what the bug is: If a table has a filter with a mantine Select/Multiselect component, the filter doesn't trigger the onChange function when an option is selected using a laptop's touchpad.

Steps to reproduce the behavior:

  1. Have a laptop with touchpad
  2. Go to https://icflorescu.github.io/mantine-datatable/examples/searching-and-filtering/
  3. Open the filter on "Department name" column.
  4. Tap on any of the options using a laptop's touchpad.
  5. The filter will close without running the onChange function, defined in the Select/MultiSelect component.

Expected behavior: After selecting one of the options, the filter and the data on the table should be updated.

Laptop:

Additional context: Select without mantine-datatable works like expected - https://mantine.dev/core/select/ I noticed that it does work when you press the touchpad, until it clicks, but just tapping it doesn't work. Also it works on a smartphone or with a keyboard.

SeniorCluckers commented 5 months ago

Does Windows have a similar option to mac trackpad?

image

If the "tap to click" option is not enabled I have the issue you're describing.

ilko-nikolov commented 5 months ago

The behavior should be consistent with https://mantine.dev/core/select/, regardless of the options users may have.

tobigumo commented 1 month ago

You will probably need to set up Nested popovers. https://mantine.dev/core/popover/#nested-popovers

For Select Component, adding the comboboxProps={{ withinPortal: false }} option might work.