akveo / react-native-ui-kitten

:boom: React Native UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/react-native-ui-kitten/
MIT License
10.21k stars 951 forks source link

Select display value not taking #1275

Closed Bandwagoner closed 3 years ago

Bandwagoner commented 3 years ago

🐛 Bug Report

Passing in the value prop in Select component does not show the corresponding display value. However, passing in a render function works (e.g. render function that returns a Text component).

To Reproduce

Steps to reproduce the behavior:

<Select
     value="Show this value"
     selectedIndex={selectedIndex}
     onSelect={() => {}}>
          {renderOptions()}
</Select>

Expected behavior

Select shows the string value.

UI Kitten and Eva version

Package Version
@eva-design/eva 2.0.0
@ui-kitten/components 5.0.0

Environment information

System: OS: Windows 10 10.0.18363 CPU: (4) x64 AMD Ryzen 3 2300X Quad-Core Processor Binaries: Node: 12.19.0 - C:\Program Files\nodejs\node.EXE npm: 6.14.8 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 4.1.0.0 AI-201.8743.12.41.6858069 npmPackages: react: 16.14.0 => 16.14.0 react-native: 0.63.3 => 0.63.3

artyorsh commented 3 years ago

Please see the Select Display Value example in the docs. I'm almost sure the problem in your code is somewhere in value or selectedIndex props.

https://akveo.github.io/react-native-ui-kitten/docs/components/select