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

permanentFilterProp and permanentFilter in useFilterState is too strict #4649

Closed
oleg-andreyev opened this issue Apr 6, 2020 · 0 comments · Fixed by #4650
Closed

permanentFilterProp and permanentFilter in useFilterState is too strict #4649

oleg-andreyev opened this issue Apr 6, 2020 · 0 comments · Fixed by #4650

Comments

@oleg-andreyev
Copy link
Contributor

oleg-andreyev commented Apr 6, 2020

What you were expecting:
While working with ReferenceInput + AutocompleteInput noticed that setFilterValue is always called.

Other information:
permanentFilterProp.current = {country: "/api/countries/58b3bd32-2f3e-11ea-8ee3-0a04f1d0b860"}
permanentFilter {country: "/api/countries/58b3bd32-2f3e-11ea-8ee3-0a04f1d0b860"}

Values are the same but due to strict ===, useFilterState is constantly calling setFilterValue

image

Ref.: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness

Environment

  • React-admin version: 3.3.3
  • React version: 16.13.1
  • Browser: Chrome/80.0.3987.149

Probably related #4473

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

Successfully merging a pull request may close this issue.

1 participant