Fix controlled component on Android #137
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As a controlled component, we should not change the internal value without authorization, it should always be controlled by the value passed in by JS.
Example code:
Before fix:
![GIF2](https://user-images.githubusercontent.com/20365169/128803539-3a1ae841-ed5f-4c17-8a41-b0a1e22e8f78.gif)
After:
![GIF](https://user-images.githubusercontent.com/20365169/128803436-3845dc22-bafd-405d-b47f-243f5eb465b7.gif)