mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
310cc38a5a
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: https://github.com/facebook/react-native/pull/24793 Differential Revision: D15293516 Pulled By: cpojer fbshipit-source-id: 5a99a60015c7e1b2968252cdc0b2661d52a15b9d