-
Notifications
You must be signed in to change notification settings - Fork 200
added renderFooter in DrawerNavigation #344
base: master
Are you sure you want to change the base?
Conversation
@@ -68,6 +69,10 @@ export default class ExNavigationDrawerLayout extends React.Component { | |||
<ScrollView contentContainerStyle={styles.navigationViewScrollableContentContainer}> | |||
{this._renderDrawerItems()} | |||
</ScrollView> | |||
|
|||
<View> | |||
{this.props.renderFooter()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering if this can/should be inside the scrollview
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in my case footer was supposed to be fixed at the bottom of the drawer. Besides I think that if you want to add something to the scrollview maybe you should use a proposed DrawerNavigationChild in #251, am I right?
related:#182 |
|
Any ETA on this? |
@zoontek i don't know why i missed your comment. Correct me if i am wrong, but adding footer in renderNavigationView would need some additional styling to make footer fixed at bottom of the screen instead of adding it after current items. I would rather avoid that for simplicity sake. You could also add header the way u described, but it is moved to separate method :) edit: yeah, instead of simply adding footer you have to write again how to render items, handle item selection etc. Imo the way I suggested is easier. |
As mentioned in #330 I've added a renderFooter to DrawerNavigation. In my project it was necessary so I've thought that maybe someone will find it useful.