react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

FAB Group appears on all pages

Open iamdarknight opened this issue 8 years ago • 2 comments

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

iamdarknight avatar Sep 11 '18 07:09 iamdarknight

@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 avatar Sep 12 '18 19:09 satya164

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

iamdarknight avatar Sep 14 '18 15:09 iamdarknight