This repository has been archived by the owner on Feb 15, 2019. It is now read-only.
Accept 2 new props for DrawerItems (disabled, handlesDrawerToggle) #220
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.
New props:
disabled
: Passed though to TouchableWithoutFeedback, as well as to render functions such asrenderTitle
.handlesDrawerToggle
: For items that will handle closing the drawer (or not) themselves after being pressed. If this prop is truthy, these items will not cause the drawer to close automatically.Reason for adding:
I have "section headers" in my drawer that help visually group a few related items together. They shouldn't respond to touch events, and are thus disabled.
I also currently have a drawer item called "Check Updates" that simply shows a spinner while checking for updates. No route is pushed, and the drawer should not be closed.
Screenshot of my app using the new props:
Misc.
Also minorly updates the README with a relevant link to source for
DrawerNavigationItem
, and gitignores a directory that's auto-generated by IntelliJ.Please let me know if there's any testing or linting you'd like me to do before merging this!
Thanks 🌵