react-native-modal-dropdown
react-native-modal-dropdown copied to clipboard
reset dropdown to placeholder
I have 2 dropdowns and I want it when i select one the other changes to the placeholder and vice-versa `<Dropdown>
<ModalDropdown
textStyle={styles.modalText}
options={templatenew}
defaultValue={modalButtonB}
onSelect = {(index, value) => { setModalVal(value), setModalButtonB('Please Select') } }
/>
</Dropdown>
<Dropdown>
<ModalDropdown
textStyle={styles.modalText}
options={templatenew}
defaultValue={modalButtonB}
onSelect = {(index, value) => { setModalVal(value), setModalButtonB('Please Select') } }
/>
</Dropdown>`
dropdownRef.current.select(-1) it in the doc
dropdownRef.current.select(-1) it in the doc
This is not working as it is giving error Cannot read property 'select' of undefined.