Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

change the amount the indicator scrolls when switching tabs? #616

Closed
hsunami10 opened this issue Oct 2, 2018 · 4 comments
Closed

change the amount the indicator scrolls when switching tabs? #616

hsunami10 opened this issue Oct 2, 2018 · 4 comments

Comments

@hsunami10
Copy link

How do I change the amount the indicator moves when switching tabs? I decreased the width of the tab view, and now the indicator starts in the correct position, but then switching to the other tab, is completely offset from where it's supposed to be. Something like this:
screen shot 2018-10-02 at 3 46 12 pm
screen shot 2018-10-02 at 3 46 06 pm

@satya164
Copy link
Owner

satya164 commented Oct 2, 2018

Currently, you can override the layout prop passed to the tab bar. We should make it automatic in future.

@hsunami10
Copy link
Author

@satya164 how do you override the layout prop? Can you give me a quick example?

@satya164
Copy link
Owner

satya164 commented Oct 3, 2018

renderTabBar = props => <TabBar {...props} layout={{ ...props.layout, width: CUSTOM_WIDTH }} />

@hsunami10
Copy link
Author

that works perfectly, thanks!

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

No branches or pull requests

2 participants