React-native-paper: FAB Group appears on all pages

Created on 11 Sep 2018  路  2Comments  路  Source: callstack/react-native-paper


Current behaviour

The FAB Group appears on all pages within a react navigation stacknavigator whose initial page contains the FAB Group.

Expected behaviour

While appreciating the ease of use that comes with this functionality, i would like that i can disable the functionality when i dont need a fab on a page within that stack navigator.

What have you tried

I tried using Portal assuming from the documentation it works like index in css. So i enclosed the entire page with the portal assuming it would render higher than the fab thereby hiding the fab.

Your Environment

| software | version
| --------------------- | -------
| ios or android | Android
| react-native | 0.55.4
| react-native-paper | ^2.0.1
| node | latest
| npm or yarn | latest

Most helpful comment

@iamdarknight it's disabled by default in v2 and I'm exploring how to integrate it properly with react-navigation. here is an approach you can use: https://snack.expo.io/@satya164/navigation-aware-portal-for-react-navigation

if you're using v1, you can listen to the focus events from react navigation and show/hide the FABGroup manually.

i dont want a fab on higher than the fab

not sure what you mean here

All 2 comments

@iamdarknight it's disabled by default in v2 and I'm exploring how to integrate it properly with react-navigation. here is an approach you can use: https://snack.expo.io/@satya164/navigation-aware-portal-for-react-navigation

if you're using v1, you can listen to the focus events from react navigation and show/hide the FABGroup manually.

i dont want a fab on higher than the fab

not sure what you mean here

@satya164 you the champ!!! You my man. Been heckling with this for since version 1.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

makhataibar picture makhataibar  路  4Comments

talaikis picture talaikis  路  3Comments

sm2017 picture sm2017  路  4Comments

yaronlevi picture yaronlevi  路  3Comments

tonyxiao picture tonyxiao  路  3Comments