This code is working fine in the emulator but on the web, the dropdown is not closing. Can you please help why it is not closing on the web browser?
react-native-paper
npm i react-native-paper-dropdown https://fateh999.github.io/react-native-paper-dropdown
const [showDropDown, setShowDropDown] = useState(false);
const [SelectDivision, setSelectDivision] = useState('');
const [showMultiSelectDropDown, setShowMultiSelectDropDown] = useState(false);
const SelectDivisionList = [
{
label: 'South',
value: 'South',
},
{
label: 'North',
value: 'North',
},
{
label: 'East',
value: 'East',
},
{
label: 'West',
value: 'West',
},
];
const AppDropDown = () => {
return (
<View style={styles.DropDownDesign}>
<View style={{width: '25%'}}>
<DropDown
label={'Select Division'}
mode={'outlined'}
dropDownStyle={{
borderColor: '#322b7c',
borderWidth: 0.7,
borderRadius: 4,
borderStyle: 'solid',
backgroundColor: 'white',
}}
visible={showDropDown}
showDropDown={() => setShowDropDown(true)}
onDismiss={() => setShowDropDown(false)}
value={SelectDivision}
multiSelect
setValue={setSelectDivision}
list={SelectDivisionList}
inputProps={{
right: <TextInput.Icon name={'chevron-down'} size={15} />,
}}
/* inputProps={{
right: <TextInput.Icon name={'caret-down'} size={15} />,
}} */
/>
</View>