Open LorenDorez opened 3 months ago
Doing some more digger the usePickerSearch
gets passed in children but in my case this appears to be undefined, should this pass in the items prop and not children?
So looks like it works if i move my items to the children like such:
import { longOptions } from "@/utils/dev/PickerScreenLongOptions";
import { useState } from "react";
import { Colors, Picker } from "react-native-ui-lib";
export default function CompanyPicker() {
const [language, setLanguage] = useState();
return (
<Picker
placeholder="Favorite Language"
floatingPlaceholder
value={language}
enableModalBlur={false}
onChange={item => setLanguage(item)}
topBarProps={{title: 'Languages'}}
// style={{color: Colors.red20}}
showSearch
searchPlaceholder={'Search a language'}
searchStyle={{color: Colors.blue30, placeholderTextColor: Colors.grey50}}
// onSearchChange={value => console.warn('value', value)}
//items={longOptions}
>
{longOptions.map(option => (
<Picker.Item key={option.value} value={option.value} label={option.label} disabled={option.disabled}/>
))}
</Picker>
);
}
but if i do that i lose the label on selected item :(
Above code is working
Hi, we are working on fix for this. related PR
Description
I copied the example picker from the Demo app but unfortunately searching doesnt appear to work. Im using Expo Go incase that might be an issue.
Related to
Steps to reproduce
ada
to the searchExpected behavior
When I type
ada
the list should filter downActual behavior
Does nothing
More Info
Code snippet
Environment
Affected platforms