-
Notifications
You must be signed in to change notification settings - Fork 734
fix: TextField defaultValue change #2388
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you share an example?
When I render a simple example of TextField
and update the defaultValue
prop it does the update as I expected..
Sorry, forgot to mention that it happens on web. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the changes from this PR in the node modules and I can't see any change when pressing the 'update default value' button..
Did you check it?
renderTree.getByDisplayValue('someValue'); | ||
}); | ||
|
||
it('on web should reset defaultValue when prop changed after first render', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest adding the same test without setting Constants.isWeb
to true
since the same behavior should also apply on mobile
Co-authored-by: Lidor Dafna <[email protected]>
Description
Currently when trying to change default value then it is not rendered.
This PR will fix this issue.
Changelog
TextField - fix defaultValue not changing