Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support screen options #55

Open
Ahmadhmaid777 opened this issue Mar 16, 2023 · 7 comments
Open

Support screen options #55

Ahmadhmaid777 opened this issue Mar 16, 2023 · 7 comments

Comments

@Ahmadhmaid777
Copy link

Curved-bottom-bar should support screen options so i can pass options to CurvedBottomBar screen
like this example

<CurvedBottomBar.Screen name={SCREEN_KEYS.PROFILE} position="RIGHT" component={ProfileScreen} options={{headerShown: false}} />

@ducpt-bili
Copy link

+1
I want do disable header, but not found the way to do it.

@ducpt-bili
Copy link

I found the way to do that.
on CurvedBottomBar.Navigator i add:
screenOptions={{ headerShown: false, }}
and it work.

@Ahmadhmaid777
Copy link
Author

I found the way to do that.
on CurvedBottomBar.Navigator i add:
screenOptions={{ headerShown: false, }}
and it work.

That's good for make header hidden in all screens but I can't hide header for specific screen or add different title for every screen

@ozdemiremrah
Copy link

Also

screenOptions={{ tabBarHideOnKeyboard: true }}

not working.

@draturi95
Copy link

draturi95 commented Apr 19, 2023

@ozdemiremrah

I'm facing the same issue.

Did you find a way to make the bottom navigator disappear for the case where the keyboard is enabled?

@ozdemiremrah
Copy link

ozdemiremrah commented Apr 19, 2023

@draturi95 I have listen Keyboard events didShow and didHide

here is my code.

const bottomBarRef = useRef();

  useEffect(() => {
    const showSubscription = Keyboard.addListener('keyboardDidShow', () => {
      //console.log('keyboardDidShow')
      bottomBarRef.current.setVisible(false)
    });
    const hideSubscription = Keyboard.addListener('keyboardDidHide', () => {
      //console.log('keyboardDidHide') 
      bottomBarRef.current.setVisible(true)
    });

    return () => {
      showSubscription.remove();
      hideSubscription.remove();
    };
  }, []);

....
<CurvedBottomBar.Navigator
        ref={bottomBarRef}
        ...
        />

@julekgwa
Copy link

I found the way to do that. on CurvedBottomBar.Navigator i add: screenOptions={{ headerShown: false, }} and it work.

This's not the way, the original support hiding individual headers but this one doesn't seem to support it.

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

No branches or pull requests

5 participants