Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal column definition value _filterFn never changes #425

Open
1 task done
rossmeredith opened this issue Oct 20, 2024 · 0 comments
Open
1 task done

Internal column definition value _filterFn never changes #425

rossmeredith opened this issue Oct 20, 2024 · 0 comments

Comments

@rossmeredith
Copy link

rossmeredith commented Oct 20, 2024

mantine-react-table version

2.0.0-beta.7

react & react-dom versions

18.3.1

Describe the bug and the steps to reproduce it

I'm calling onSelectFilterMode below with my own filter names (right near the bottom of the provided screenshot). However it seems buggy. Upon closer inspection it seems internally this api method does not update state if the value hasn't changed. This makes sense except the previous value is read from columnDef._filterFn which never changes in my case, it is always "contains" which is the initial value (to check I'm logging to the console the value, just before making the state update call).

image

...Looking through the library code I can't see anywhere this internal value ever changes except for in prepareColumns which is presumably only called as part of initializing state.

Minimal, Reproducible Example - (Optional, but Recommended)

N/A

Screenshots or Videos (Optional)

N/A

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

No, because I do not know how

Terms

  • 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant