-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Environment
react-native -v: 0.51.0npm ls rnpm-plugin-windows: 0.2.8npm ls react-native-windows: 0.51.0-rc.1node -v: 8.9.4npm -v: 5.6.0yarn --version: 1.3.2
Then, specify:
- Target Platform: UWP
- Target Platform Version(s): 10.0.14393
- Target Device(s): Desktop
- Development Operating System: Windows
- Visual Studio Version: 2017
Steps to Reproduce
- Add a Picker to a screen with one or more items in it.
- Set the selectedValue to a value that is not in the list.
- Run the app.
Expected Behavior
The text shown in the component (ComboBox) is empty/blank.
Actual Behavior
The text from the first item is displayed in the component (ComboBox). This also has the side effect of not displaying the correct text from the first item if the items change and the selected index doesn't.
Reproducible Demo
https://github.com/kmcclive/react-native-windows-picker-test
- Clone the repository.
- Restore packages:
npm install - Run the app:
react-native run-windows - Verify that "A" is displayed in the Picker even though the
selectedValueis set to "D".
If you want to observe the side effect I mentioned, you can modify index.js to use App.js instead of App2.js, and verify that not all items are selected properly.
Metadata
Metadata
Assignees
Labels
No labels