react-native-curved-bottom-bar icon indicating copy to clipboard operation
react-native-curved-bottom-bar copied to clipboard

Support screen options

Open Ahmadhmaid777 opened this issue 1 year ago • 7 comments

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}} />

Ahmadhmaid777 avatar Mar 16 '23 13:03 Ahmadhmaid777

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

ducpt-bili avatar Mar 17 '23 04:03 ducpt-bili

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

ducpt-bili avatar Mar 17 '23 05:03 ducpt-bili

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

Ahmadhmaid777 avatar Mar 17 '23 09:03 Ahmadhmaid777

Also

screenOptions={{ tabBarHideOnKeyboard: true }}

not working.

ozdemiremrah avatar Mar 17 '23 20:03 ozdemiremrah

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

draturi95 avatar Apr 19 '23 07:04 draturi95

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

ozdemiremrah avatar Apr 19 '23 11:04 ozdemiremrah

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.

julekgwa avatar Jun 16 '23 14:06 julekgwa