'React Native DrawerNavigator to right doesn't work as expected

When I set drawerPosition: 'right' it behaves strangely. For the drawerPosition: left, it works as expected. The blue panel on the screenshot is the drawer that is always visible when I set its position right. In that case when I open the drawer this blue panel opens to the end at the left side and covers entire screen. What config property I am missing?

Here is a short extract for Navigator

<NavigationContainer style={styles.container}>
        <Drawer.Navigator
            initialRouteName="Home"
            screenOptions={{
                drawerPosition: 'right', //left, right
                //headerShown: false,
                drawerHideStatusBarOnOpen: false,
                swipeEnabled: true, //disable/enable drawer dragging
                //drawerType: 'slide', //front, back, slide, permanent
                drawerStyle: {
                    backgroundColor: '#c6cbef'
                },
            }}
        >
            <Drawer.Screen
                name="Home"
                component={Home}
                options={{
                    title: 'Home Page'
                }}
            />
            <Drawer.Screen
                name="Details"
                component={Details}
            />
        </Drawer.Navigator>
    </NavigationContainer>

enter image description here



Solution 1:[1]

drawerStyle: {right: 0} helped me

<NavigationContainer>
    <Drawer.Navigator
        initialRouteName="Main"
        screenOptions={{
            drawerPosition: 'right',
            drawerHideStatusBarOnOpen: false,
            swipeEnabled: true,
            drawerStyle: {
                right:0
            },
        }}
    >
        <Drawer.Screen
            name="Main"
            component={Main}
            options={{
                title: 'Main',
            }}
        />

    </Drawer.Navigator>
</NavigationContainer>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 gogagubi