-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PickerAndroid will reset selected value during items update. (#24793
) Summary: Fixes #13351 Two root causes: 1. Android Spinner will reset selection to undefined after setAdapter() which will trigger onValueChange(). The behavior is not expected for RN. And the solution is to setSelection() explicitly 2. In original implementation, it setups `items` immediately, but delays the `selected` setup after update transaction. There will be some race condition and incosistency if update `items` only. The fix will do the setup all after update transaction. [Android] [Fixed] - Fix #13351 PickerAndroid will reset selected value during items update. Pull Request resolved: #24793 Differential Revision: D15293516 Pulled By: cpojer fbshipit-source-id: 5a99a60015c7e1b2968252cdc0b2661d52a15b9d
- Loading branch information
1 parent
ebeb893
commit 310cc38
Showing
2 changed files
with
32 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters