-
Notifications
You must be signed in to change notification settings - Fork 187
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
Indicator width on Scrollable Tabs #77
Comments
The tabs follow the refMap object keys order, and your screen components also should match this order. How are your refMap and screens arranged? |
Hi @PedroBern My
With my <Tabs.Container
containerRef={containerRef}
HeaderComponent={_renderHeader}
headerContainerStyle={TabBarStyle.headerContainerStyle}
lazy
onIndexChange={onIndexChange}
refMap={refMap}
snapEnabled
TabBarComponent={_renderTabBar}
>
<SearchTattoos name={t('screens.Search.tabs.tattoos')} />
<SearchArtists name={t('screens.Search.tabs.artists')} />
<SearchStudios name={t('screens.Search.tabs.studios')} />
<SearchCollectors name={t('screens.Search.tabs.collectors')} />
</Tabs.Container> This issue also appears in the example, displayed here: #79 |
Actually, I've just checked the current example for scrollable tabs, actually, the issue is also present there without any changes. |
@PedroBern I've pushed what I think is a fix. I believe that we have to sort by |
Hey alex I would recommend getting the tab names like this: const [refMap] = useState({
[screens.Search.tabs.tattoos]: tattoosRef,
[screens.Search.tabs.artists]: artistsRef,
[screens.Search.tabs.studios]: studiosRef,
[screens.Search.tabs.collectors]: collectorsRef,
});
// on tabBar
getLabelText={(name) => t(name)} Translating on the tab bar will prevent the whole thing to rerender if the user changes the idiom of the app. |
@PedroBern There may be an issue with the Indicator on the scrollable after #75 It's like the Tabs are in the wrong order?
The text was updated successfully, but these errors were encountered: