mantine-react-table icon indicating copy to clipboard operation
mantine-react-table copied to clipboard

"popover" columnFilterDisplayMode does not seem to work with filterVariant: select

Open ericblade opened this issue 1 year ago • 2 comments

mantine-react-table version

2.0.0-alpha.16

react & react-dom versions

18.2.0

Describe the bug and the steps to reproduce it

The popover comes up, but selecting anything in the select drop down, or entering text, fails to actually run the filter.

This is also visible in the popover example in the documentation.

Minimal, Reproducible Example - (Optional, but Recommended)

https://v2.mantine-react-table.com/docs/guides/column-filtering#alternate-column-filtering-demo

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

None

Terms

  • [X] I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

ericblade avatar Feb 09 '24 06:02 ericblade

Hey, can you try with the beta.0 and confirm is this is still an issue?

alessandrojcm avatar Mar 18 '24 14:03 alessandrojcm

If the documentation site has been updated, then it's still an issue. I hope to have some time to check it out on my personal app this weekend sometime. Thanks for the notice, and I'll let you know as soon as I have a chance.

ericblade avatar Mar 23 '24 09:03 ericblade

I am experiencing this issue on 2.0.0-beta.1

waltershewmake avatar May 05 '24 21:05 waltershewmake

Presumably, this is because there is no way to stop event propagation from the Mantine Select field dropdown without rewriting it using a custom ComboBox implementation (as far as I am aware). For the same reason, this issue is likely also present in the autocomplete filter variant, which uses a ComboBox under the hood as well.

waltershewmake avatar May 05 '24 21:05 waltershewmake

Actually, I just found a solution. I will fork and propose a fix. In MRT_FilterTextInput you can wrap the entire return block with

<div onMouseDown={(e) => e.stopPropagation()}>
...
</div>

waltershewmake avatar May 05 '24 21:05 waltershewmake

Merged, thanks @waltershewmake

alessandrojcm avatar May 07 '24 08:05 alessandrojcm

Apologies it took me a few .. months... :( to check in on this, just got my app back up now that i've got some time off from work. Time now to update all the dependencies, and I'll check this out. If it's still a problem, I'll reopen.

Thank you so much!

ericblade avatar Jul 04 '24 01:07 ericblade