How to keep DrawerItem selected?

Please provide the following:

  1. SDK Version: 47.0.0
  2. Platforms(Android/iOS/web/all):all
  3. @react-navigation/drawer”: “^6.5.0”

I have a DrawerNavigator that looks like this:

        <DrawerItemList {...props} />
        <View style={s`my-10`}>
          <LineSeparator />
            label="My Account"
            onPress={() => console.log("My Account")}
            label="Customer Support"
            onPress={() => props.navigation.navigate(Routes.customerSupport)}
            // to={Routes.customerSupport}
          <LineSeparator />

As you can see I have a couple of custom DrawerItem(s) that work as expected, but I don’t know ho to keep them selected after I click on them and open the drawer.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.