question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Drawer keep opening on drag even with drawerLockMode set

See original GitHub issue

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.1
  • react v16.3.1
  • react-native v0.55.4
  • native-base v2.8.0
  • redux v4.0.0

Expected behaviour

Do not open the drawer when drawerLockMode is ‘locked-closed’

Actual behaviour

The drawer opened on drag.

Steps to reproduce

render() {
return (
	<Provider
		store={createStore(reducers, composeWithDevTools(applyMiddleware(thunk)))}>
		<Container>
			<Content scrollEnabled={false} contentContainerStyle={{ flex: 1 }}>
				<Root>
					<Router>
						<Drawer
							hideNavBar
							key="drawer"
							open={false}
							contentComponent={Sidebar}
							drawerWidth={300}>
							<Scene key="root">
								<Scene
									key="splash"
									component={Splash}
									hideNavBar
									initial
									drawerLockMode="locked-closed"
								/>
								<Scene
									key="login"
									component={Login}
									hideNavBar
									drawerLockMode="locked-closed"
								/>
							</Scene>
						</Drawer>
					</Router>
				</Root>
			</Content>
		</Container>
	</Provider>
);
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
daviscabralcommented, Sep 13, 2018

You will have to do something using onEnter events to manage the Drawer.

0reactions
daviscabralcommented, Sep 19, 2018

This seems a questions better suited for StackOverflow. If you find that this was mistakenly closed and it is really a bug, please reopen and provide a code sample.

That will help with the tests when new versions come. Failing tests might get added to the examples in the long run (tests would be much better actually).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Drawer keep opening on drag even with drawerLockMode set
Drawer keep opening on drag even with drawerLockMode set. ... Coming soon: A brand new website interface for an even better experience!
Read more >
react native drawer navigation drag drawer from left to right ...
Also in navigationOptions of Home , drawerLockMode is set to locked-closed which means you can't use gestures to open or close the drawer....
Read more >
How to fix a drawer that opens on its own - YouTube
Some of the drawers of my wardrobe don't stay closed anymore. The DIY fix for the problem was to install a magnetic catch...
Read more >
My Dresser Drawers Keep Opening Up/Not Level/How Do I ...
https://www.youtube.com/user/VideoJoeShows#crookeddresser#dressercrooked#dresserdrawerscrooked#dresserdrawersnotlevel#howtofixcrookeddresser ...
Read more >
Drawer Navigator | React Navigation
Component that renders a navigation drawer which can be opened and closed via gestures.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found