router icon indicating copy to clipboard operation
router copied to clipboard

Drawer defaultStatus="closed" not honoured on initial load

Open georgevicbell opened this issue 1 year ago • 7 comments

Which package manager are you using? (Yarn is recommended)

npm

Summary

When defaultStatus="closed" is set on a Drawer, the drawer starts open, then immediately animates closed...expected behaviour is that the drawer should start closed - with no animation...

Minimal reproducible example

<Drawer initialRouteName="home" defaultStatus="closed" screenOptions={{ headerStyle: {}, headerTintColor: "#000", headerTitleStyle: { fontWeight: "bold", }, header: (props) => { return ( <View> <Pressable onPress={() => { props.navigation.toggleDrawer() }}> <Ionicons name="menu" size={32} color="black" /> </Pressable> </View> ); }, }}

<Drawer.Screen
  name="index" // This is the name of the page and must match the url from root
  options={{
    drawerLabel: "Home",
    title: "overview",
  }}
/>

georgevicbell avatar Aug 12 '23 18:08 georgevicbell