ERROR TypeError: undefined is not an object (evaluating '_ref3.label')
This error is located at:
in DropDownPicker (at ConsultForm.tsx:261)
다른 페이지로 넘어갈 때 defaultValue의 값을 null로 만들 것!
<DropDownPicker
...
defaultValue={selectedConsultType} />
const onSubmit = useCallback(async () => {
try {
Alert.alert('문의가 접수되었습니다.');
navigation.navigate('Consult');
setSelectedConsultType(null);
}
catch(error){
...
}
참조:
https://github.com/hossein-zare/react-native-dropdown-picker/issues/137