KevinVandy/material-react-table

When the options for filterSelectOptions are variables the component don't rerender

nfuenmamelt opened this issue · 1 comments

material-react-table version

2.0.0

react & react-dom versions

18.2.0

Describe the bug and the steps to reproduce it

We have a custom filterselectoption for one column. but that filter depends on the values for that same columns.

For example:

We create a new tag, and all tags will be available to filter in that column.

Screenshot from 2024-07-03 09-47-41

On that image you can see we added a new tag but on filter options don't appear.

I believe it could be related to a memoized component of the multi-select filter.

Minimal, Reproducible Example - (Optional, but Recommended)

filterSelectOptions: devicesGroups.map((item) => ({ text: item.name, value: item.name, })),

Screenshots or Videos (Optional)

Screencast.from.03-07-24.09.50.00.webm

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.

share more code, or even a full sandbox repro. Might just be that your columnDefs did not have the proper dependency array in the useMemo. But impossible to tell if you don't show it.