Closed yashpatel100 closed 1 year ago
i am using 3.3.0 version, try this by patch-package
diff --git a/node_modules/react-native-select-dropdown/src/SelectDropdown.js b/node_modules/react-native-select-dropdown/src/SelectDropdown.js index a59b78d..3bdac77 100644 --- a/node_modules/react-native-select-dropdown/src/SelectDropdown.js +++ b/node_modules/react-native-select-dropdown/src/SelectDropdown.js @@ -166,7 +166,7 @@ const SelectDropdown = ( const renderDropdown = () => { return ( isVisible && (
-const DropdownModal = ({visible, statusBarTranslucent, children}) => { +const DropdownModal = ({visible, statusBarTranslucent, children, onRequestClose}) => { const defaults = { statusBarTranslucent: statusBarTranslucent || false, }; @@ -10,6 +10,7 @@ const DropdownModal = ({visible, statusBarTranslucent, children}) => { supportedOrientations={['portrait', 'landscape']} animationType="none" transparent={true}
Thanks, @btooom1999 this issue has been fixed in v3.3.2 in this commit 743d62e
I need to come back when clicking on the android back button like below code
import React from 'react'; import {Modal} from 'react-native'; import { useNavigation } from '@react-navigation/native'
const DropdownModal = ({setIsVisible, visible, statusBarTranslucent, children}) => { const navigation = useNavigation(); const defaults = { statusBarTranslucent: statusBarTranslucent || false, }; return ( <Modal onRequestClose={()=>{ setIsVisible(false) navigation.goBack() }} supportedOrientations={['portrait', 'landscape']} animationType="none" transparent={true} statusBarTranslucent={defaults.statusBarTranslucent} visible={visible}> {children} ); }; export default DropdownModal;