Skip to content
This repository has been archived by the owner on Feb 15, 2019. It is now read-only.

added renderFooter in DrawerNavigation #344

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nehvaleem
Copy link

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.

@@ -68,6 +69,10 @@ export default class ExNavigationDrawerLayout extends React.Component {
<ScrollView contentContainerStyle={styles.navigationViewScrollableContentContainer}>
{this._renderDrawerItems()}
</ScrollView>

<View>
{this.props.renderFooter()}
Copy link
Contributor

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

Copy link
Author

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?

@chirag04
Copy link
Contributor

related:#182

@zoontek
Copy link

zoontek commented Jan 20, 2017

renderFooter can be way easier to use than implementing his own Drawer navigation view using renderNavigationView 👍 (if you only need a drawer footer)

@zoontek
Copy link

zoontek commented Feb 8, 2017

Any ETA on this?

@nehvaleem
Copy link
Author

nehvaleem commented Mar 1, 2017

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants