-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
issue: Setting 'disabled' to false in input components crashes the app #10907
Comments
I've not used I was able to reproduce the issue with a much lower RHF version; there's a chance your implementation's missing a resource name that's lead to an Consider checking out the |
@Moshyfawn Thank you, I will check it out |
@Moshyfawn I noticed that removing strict mode solves the issue. It seems like the getter function itself is undefined on the second render. I guess resources.undefined is not a problem here because it works on the initial render. |
I think this is related to what I faced in #10908 when |
FWIW, removing strict mode did not resolve for me. I also played with setting default values for those fields and that did not provide a work-around. I'm currently 'hard-coding' until resolved what used to be a more dynamic 'disabled' functionality in my components that was based on state in the parent. Using syntax e.g. disabled={isDisabled} was, for. me at least, the syntax that triggers issue. |
Hi, I see that this issue was labeled with "question", but to me it is clearly a bug (and a regression). Many users are experiencing this issue, so please consider it as worthy of a rapid fix. |
Just chiming in to say, I've encountered this same problem with a rather complex form field. This release caused our unit tests to hang, and we can't move forward until it's patched. Thanks everyone for reporting this! |
Seeing this as well. Setting the disabled attribute to |
Came here to open a new issue for it but looks like it's already discovered. |
Version Number
7.46.1
Codesandbox/Expo snack
https://github.com/marit970/react-disabled-bug
Steps to reproduce
Expected behaviour
After an update (to v.7.46.1) there is an issue with the 'disabled' property. The app crashes when setting the disabled property in react-admin input components to 'false'. (It works correctly when setting it to 'true' or 'undefined'). This issue appears in v.7.46.0 and v7.46.1 as well. (Also I am using the latest react-admin version 4.13.3).
![Bildschirmfoto von 2023-09-08 11-16-55](https://private-user-images.githubusercontent.com/43189340/266651724-0543b22a-98dc-4fac-8888-271b2efe30e9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMDQ2MDgsIm5iZiI6MTczOTAwNDMwOCwicGF0aCI6Ii80MzE4OTM0MC8yNjY2NTE3MjQtMDU0M2IyMmEtOThkYy00ZmFjLTg4ODgtMjcxYjJlZmUzMGU5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDA4NDUwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ3ZDZjZjAzYTgwN2EyNzhmNDE3Y2VmMTE3ZmQyZjdkZGJhNzUyYTU5OWFlNjk3MGNhODg2ZjA4MTIxYjk3NzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9e2wzlk8_EPODNV8xo7ZCmmnSKsZXrEfhY5jCuNNOCU)
What browsers are you seeing the problem on?
Firefox, Chrome
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: