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

Filter string not showing if set programmatically when showColumnFilters=true #243

Closed
1 task done
BendixP opened this issue Dec 9, 2022 · 2 comments
Closed
1 task done

Comments

@BendixP
Copy link

BendixP commented Dec 9, 2022

material-react-table version

1.3.16

react & react-dom versions

18.0.20

Describe the bug and the steps to reproduce it

If showColumnFilter is true and I set a filter programmatically the string is not shown at first. Only if I close and open the filter row it appears.

Minimal, Reproducible Example - (Optional, but Recommended)

https://stackblitz.com/edit/github-ikb5ar?file=src/TS.tsx

Screenshots or Videos (Optional)

No response

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

Maybe, I'll investigate and start debugging

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.
@KevinVandy
Copy link
Owner

KevinVandy commented Dec 9, 2022

This is a known issue. My plan is to get rid of the separate state managed by the filter components themselves. 2 Problems with this is that there will no longer be any debouncing built in, and it will require React 18 concurrent mode features to keep a good rendering performance as the user types, which will bump up the requirements of this library.

If someone else has a better idea that does not require React 18, I'd like to hear it. Otherwise, this will be a v2.0 feature as a breaking change

@KevinVandy
Copy link
Owner

@BendixP I think this should be fixed in v1.5.4
Created a storybook example to keep track of this too https://www.material-react-table.dev//?path=/story/features-filtering-examples--external-set-filter-value

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

2 participants