thodubois/react-native-woodpicker

onClose fired on render and no more, onOpen is fired on first opening and no more

indapublic opened this issue · 1 comments

"version": "0.3.15"

I have this code

<Picker
   DoneBarComponent={() => (
   	<DoneBar
   		onDonePress={() => {
   			const item = pickerItem || selectedItem;
   			if (!item) {
   				return;
   			}
   			props.onChange(item.value);
   			pickerRef.current && pickerRef.current.close();
   		}}
   	/>
   )}
   doneButtonLabel="Готово"
   isNullable={false}
   item={selectedItem}
   items={props.items}
   placeholder={props.placeholder}
   ref={pickerRef}
   style={styles.picker}
   onClose={() => {
   	console.log("closed");
   	setOpened(false);
   }}
   onItemChange={setPickerItem}
   onOpen={() => {
   	console.log("opened");
   	setOpened(true);
   }}
   //backdropAnimation={{ opacity: 0 }}
   // mode="dropdown"
   //disable
/>

onClose is fired immediately on render and no more in future
onOpen is fired on first opening and no more in future

 LOG  closed
 LOG  closed
 LOG  opened
 LOG  opened

Tried with mode="dropdown" and mode="dialog", no differene

Hello,
find out where it came from. You can try the v0.3.17 =)