This repository has been archived by the owner on Sep 13, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm not sure if anyone else experiences this issue, but when the SideMenu is opened and closed via an external trigger, you have to tap the external button again in order for the toggle to work.
I thought this issue was related to facebook/react-native#12784, but everything I tried still resulted in the "toggle" button needing to be pressed twice after close. After debugging, I narrowed it down to this package. When I remove this package, buttons work just fine.
The behavior seems to only happen after the SideMenu is open. The menu closes, but any onPress function does not fire after, until it's pressed again. The internal state of the component updates the
isOpen
prop on local state.This proposed change allows an externalToggle (function) be passed in, which fires when the "overlay" component is pressed.
Feedback is greatly appreciated as I don't know if this is a good workaround and/or update to the package. Additionally I'm not well versed with TypeScript.