-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
FormDataConsumer component
cause rerendering or glitching the input upon selection/reset the value
#10415
Comments
issue.webmissue screencast |
Is this the expected behavior when using FormDataConsumer to hide or unhide an input based on another input? I referenced this approach from our documentation. |
This same issue is also present on the edit page of a post, i have make the change in the given sand box you can see that too. |
Reproduced. I confirm the flickering is not intended behavior. |
Unfortunately we had to revert #10417 as it caused issues with our |
Hi @djhi, with all due respect, when can this issue be fixed again? |
What you were expecting:
In the create post form, selecting a value for user from the autocomplete input should be smooth, without glitches or triggering a full component re-render.
What happened instead:
In the create post form, selecting a user value from the autocomplete input causes glitches or triggers a full component re-render. When I move the ReferenceInput component outside of the FormDataConsumer component, the issue is resolved, but it should work even when wrapped inside the FormDataConsumer component.
Steps to reproduce:
Preferably, a sandbox forked for reproducing the code.
https://stackblitz.com/edit/github-uaewfaxm?file=src%2Fposts.tsx
Other information:
Screeen Cast of issue here
https://github.com/user-attachments/assets/4c6ed69a-e9ac-4b95-851b-7efca0dfc008
Environment
React-admin version: ^5.4.2
Last version that did not exhibit the issue (if applicable): 4.12.0 does not have this issue
React version: ^18.3.1
Browser: chrome
The text was updated successfully, but these errors were encountered: