wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.04k stars 2.67k forks source link

Change bottom tab visibility #7683

Open agestaun opened 1 year ago

agestaun commented 1 year ago

Describe your idea

Hi there,

In the current project I am working on, we need to display 4 tabs at the beginning. However when the user enables a feature from settings, we need to call setRoot again to display an additional tab. When calling setRoot, you can see that the app flickers, so the UX is not very good. I would like to call mergeOptions in order to display any loaded but hidden tab. This way I don't have to reload everything after calling setRoot, and the UX is much better.

I would expect something like this:

Navigation.mergeOptions('root', { bottomTab: { id: 'bluetoothTab', visible: true } })

Thanks :)

Motivation

Improve the user experience and update the available bottom tabs faster and in a more elegant way.

Are you willing to resolve this issue by submitting a Pull Request?

filipef101 commented 1 year ago

I've also stumbled upon this, after much digging on ios I was unsucessful

Rubenvdveen commented 1 year ago

I would also really like this feature. Seems kind of crazy that this does not yet exist..?

ahmedawaad1804 commented 1 year ago

can you provide video recording please ?

Rubenvdveen commented 1 year ago

@ahmedawaad1804 There isn't much to record, because when we try the following:

Navigation.mergeOptions('OFFERS', {
      bottomTab: {
        visible: false,
      },
    })

The bottom tab doesn't get hidden from the bottomtabs.

bishalraif commented 1 year ago

@ahmedawaad1804 There isn't much to record, because when we try the following:

Navigation.mergeOptions('OFFERS', {
      bottomTab: {
        visible: false,
      },
    })

The bottom tab doesn't get hidden from the bottomtabs.

@ahmedawaad1804 There isn't much to record, because when we try the following:

Navigation.mergeOptions('OFFERS', {
      bottomTab: {
        visible: false,
      },
    })

The bottom tab doesn't get hidden from the bottomtabs.

@Rubenvdveen hey did you find anyway to make bottom tab hidden ?