react-native-dropdown-picker icon indicating copy to clipboard operation
react-native-dropdown-picker copied to clipboard

Filtering the selected item from the dropdown

Open lavin67 opened this issue 3 years ago • 0 comments

Hello, I have an array of data which includes three items, I want to make whenever one is selected, it gets excluded from the dropdown items, so that it wouldn't look like a duplicate option. When I try

const [selectedLang, setSelectedLang] = useState(i18n.language);
items.filter(item => item.value !== i18n.language);

it does filter the items, but the selection does not work since the items are filtered and the selected Item does not exist anymore on the array anymore (that's what I guess is going on).

how can I implement this ?

Thank you,

lavin67 avatar May 15 '22 12:05 lavin67