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

TabsController - selecting tab item programmatically (issue) #931

Closed
melcug opened this issue Oct 21, 2017 · 2 comments
Closed

TabsController - selecting tab item programmatically (issue) #931

melcug opened this issue Oct 21, 2017 · 2 comments

Comments

@melcug
Copy link

melcug commented Oct 21, 2017

In latest release of Material (v2.12.3) I can select a tab item programmatically, but the bar is not scrolled to make visible the selected tab button.

Code used to select a tab item by index:

tabsController?.select(at: tabIndex)
tabsController?.tabBar.select(at: tabIndex, completion: { (tabItem) in
	// ...
})
@melcug melcug changed the title TabsController - selecting tab item programmatically issue TabsController - selecting tab item programmatically (issue) Oct 21, 2017
@daniel-jonathan daniel-jonathan self-assigned this Oct 22, 2017
@daniel-jonathan
Copy link
Member

Taking a look now :)

@daniel-jonathan
Copy link
Member

You will find a fix in Material 2.12.4 and you should only need to use:

tabsController?.select(at: tabIndex)

Thank you and all the best!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants