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

dotIndicator is shown on the next tab when badge in null on ios #7146

Closed
flexsurfer opened this issue Jun 3, 2021 · 4 comments
Closed

dotIndicator is shown on the next tab when badge in null on ios #7146

flexsurfer opened this issue Jun 3, 2021 · 4 comments

Comments

@flexsurfer
Copy link

flexsurfer commented Jun 3, 2021

dotIndicator is shown on the next tab when badge is null on ios

To Reproduce

  1. Show badge
Navigation.mergeOptions('componentId', {
  bottomTab: {
    badge:"1"
  },
});
  1. Hide badge and show dotIndicator
Navigation.mergeOptions('componentId', {
  bottomTab: {
    badge:null,
    dotIndicator: {visible: true}
  },
});

Expected behavior

dotIndicator is shown for componentId tab

Actual Behavior

dotIndicator is shown for the next tab

Your Environment

  • React Native Navigation version: 7.13.0
  • React Native version: 0.63.4
  • Platform(s) (iOS, Android, or both?): iOS 13.5
  • Device info (Simulator/Device? OS version? Debug/Release?): Simulator and Device, Debug and Release
@anagovitsyn
Copy link

you should set this options for bottomTab, not for bottomTabs

@flexsurfer
Copy link
Author

yes, mistake in the description, fixed

@eightyfive
Copy link

eightyfive commented Feb 13, 2022

This is happening to me as well. Strange behavior.

Component IDs look right, but the dotIndicator is displayed ont the Tab with badge: null.

This along with that, I'm running in circles and becoming cuckoo lol.

@eightyfive
Copy link

Ok I did run some other tests, and it does not seem to be related to badge: null in particular. It's a broader issue, it happens when "using multiple times Navigation.mergeOptions" on some/all tabs.

Hope this helps.

yogevbd pushed a commit that referenced this issue Feb 12, 2023
…ng tab button (#7684)

Fix the bottomTab dotIndicator is displayed at a wrong tab button after changing the badge state.

Related issue: #7146

### Repro

It happens after we modify the badge option by calling `mergeOptions` .

https://user-images.githubusercontent.com/25456520/218294543-57d214ec-322f-40c2-9dce-bd4a86fd8354.mp4

### Solution

Fix `getTabView` to return the correct view at the given index.
It currently uses `subviews` to find the view at index, but it doesn't work after tab bar buttons are modified.
Fixed it by using `tabBarItemViewAtIndex` which is already implemented.
@yogevbd yogevbd closed this as completed Feb 12, 2023
SudoPlz pushed a commit that referenced this issue May 30, 2023
…ng tab button (#7684)

Fix the bottomTab dotIndicator is displayed at a wrong tab button after changing the badge state.

Related issue: #7146

### Repro

It happens after we modify the badge option by calling `mergeOptions` .

https://user-images.githubusercontent.com/25456520/218294543-57d214ec-322f-40c2-9dce-bd4a86fd8354.mp4

### Solution

Fix `getTabView` to return the correct view at the given index.
It currently uses `subviews` to find the view at index, but it doesn't work after tab bar buttons are modified.
Fixed it by using `tabBarItemViewAtIndex` which is already implemented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants