0

On android of react-native-modalize it is not possible to close the modal by swipe. On IOS it is working perfect with out any bugs, even ScrollView inside of modal. I tried to add properties but it does not work:

panGestureComponentEnabled={true}
panGestureEnabled={true}

My config:

"react-native": "0.65.1",
"react-native-gesture-handler": "^2.4.2",
"react-native-modalize": "^2.1.1",

Please can you share your experience how to solve this bug on android.

jocoders
  • 1,594
  • 2
  • 19
  • 54

1 Answers1

1

I have found the decision. You need to wrap your app component into GestureHandlerRootView like this: App.tsx

import {GestureHandlerRootView} from "react-native-gesture-handler"

const App = () => {

  return (
    <GestureHandlerRootView style={{flex: 1}}>
      <YourAppComponent />
    </GestureHandlerRootView>
  )
}

jocoders
  • 1,594
  • 2
  • 19
  • 54