react-native-select-two
react-native-select-two copied to clipboard
Data only passing Id
Hi,
When you select an item it only passes the Id of the object and not the name. is there away to pass the name too?
I'm having the same issue.

I solved problem. Copy name value to id value then use data[0] value. Because id value not necessary for me.
there is a second argument you can access look at the onSelect you can see all the selected item in the console and not only the id. It's not ideal but it does the work. Although i don't see the point of displaying only the id
<Select2
onChange={onChange}
selected={value || []}
isSelectSingle
style={{borderRadius: 5}}
colorTheme="blue"
popupTitle="Select item"
title="Select item"
listEmptyTitle="Aucun Résultat"
data={options}
onSelect={(data, object) => {
console.log('data ==>', data);
console.log('object ==>', object);
}}
onSelect={onChange}
onRemoveItem={onChange}
{...restProps}
/>
</View>```
@mehdikbj any Idea how to remove or reset ?