Closed jaooe closed 4 years ago
Please see Display Value example of the documentation
Use value
instead of selectedIndex
That's just poor documentation. Who would want to show "Option 1" etc? I think this should be fixed in the "Select simple usage" docs.
I can make a PR just point me in the right direction
I am fetching data from API call I need to display value and on select i need to send id of actual data but I am not able to do it it is still showing option 1 ,2 etc
Use
value
instead ofselectedIndex
Apparently the select-kitten in case you haven't sent the property value , they show "Option N" by the index of selectedIndex. So is required set the value with the text to show in the current select
value | ReactText \ | (TextProps) => ReactElement | String, number or a function component to render for the selected options. By default, callsĀ toString()Ā for each index in selectedIndex property. If it is a function, expected to return a Tex |
---|
š Bug Report
As per title, the select input shows Option 1, 2, 3 etc... When an option is selected, regardless of the provided 'title' prop
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Title provided through prop should be shown in the select
UI Kitten and Eva version
Environment information
System: OS: Linux 5.3 Ubuntu 19.10 (Eoan Ermine) CPU: (4) x64 Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz Binaries: Node: 14.3.0 - /usr/bin/node Yarn: 1.22.4 - /usr/bin/yarn npm: 6.14.5 - /usr/bin/npm npmPackages: react: ~16.9.0 => 16.9.0 react-native: https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz => 0.61.4