react-native-dropdown-picker
react-native-dropdown-picker copied to clipboard
Update icon after item is selected
I'm just wondering if it's possible to update the icon to a "checked" state after an item is checked (not the TickIcon). Something like this:

I tried to manipulate the entire item list from setItems() with onSelectItem() but it does not work.
const onSelectItem = item => {
const selectedJobTypes = JOB_TYPES.map(type => ({
label: type.label,
value: type.value,
icon: value.includes(type.value) ? <CheckedBox /> : <UncheckedBox />,
}));
setItems(selectedJobTypes);
};