Closed grmnlxndr closed 3 months ago
Describe the bug When having a Select component with both defaultOption and searchable props, the Select is rendered with the placeholder text instead of the defaultOption label.
<Select options={DATA} defaultOption={{ label: 'Option 3', value: 'option3'}} searchable />
To Reproduce Check this Snack to see the current behavior: Snack Demo
Expected behavior The Select component should render the defaultOption label instead of the placeholder text.
Screenshots The select when first rendered, it is not showing the default option, but the empty search field with the placeholder text:
When opening the select for the first time, it shows the default option selected in the option list:
Environment (please complete the following information):
Additional context Looks like the searchfield is not pre-populating the defaultOption's label when both options are enabled.
Thanks,
Germán
@grmnlxndr fix has been merged: https://github.com/MobileReality/react-native-select-pro/pull/245/files
Thanks Dawid!
Describe the bug When having a Select component with both defaultOption and searchable props, the Select is rendered with the placeholder text instead of the defaultOption label.
<Select options={DATA} defaultOption={{ label: 'Option 3', value: 'option3'}} searchable />
To Reproduce Check this Snack to see the current behavior: Snack Demo
Expected behavior The Select component should render the defaultOption label instead of the placeholder text.
Screenshots The select when first rendered, it is not showing the default option, but the empty search field with the placeholder text:
When opening the select for the first time, it shows the default option selected in the option list:
Environment (please complete the following information):
Additional context Looks like the searchfield is not pre-populating the defaultOption's label when both options are enabled.
Thanks,
Germán