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

Fix ReferenceManyField executes filter reset filter too often #10371

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

fzaninotto
Copy link
Member

@fzaninotto fzaninotto commented Nov 21, 2024

Problem

We used an alternative to setState called safeSetState that disabled some React linter warnings. This silenced a problem of effect running too often in useList and useReferecneManyFieldController.

The removal of safeSetState in #10341 revealed the problem, which is now reported by a linter warning (e.g. , https://github.com/marmelab/react-admin/pull/10370/files#diff-66e51c85b7ef7a61bc686a09a730355d6cc188a86670eb5d710d0d41d74ad5fe)

image

Solution

Add the required dependencies

@fzaninotto fzaninotto added the RFR Ready For Review label Nov 21, 2024
@slax57 slax57 added this to the 5.4.1 milestone Nov 21, 2024
@slax57 slax57 merged commit 29f4cab into master Nov 21, 2024
15 checks passed
@slax57 slax57 deleted the Fix-set-state-warning branch November 21, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants