Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

support <uib-tabset model="mySelectedTabName"> so that you can expose or set the selected tab name #5152

Closed
jstrachan opened this issue Jan 6, 2016 · 6 comments

Comments

@jstrachan
Copy link

Rather like using ng-model with things like it would be really handy to be able to know the currently selected tab or to set the selected tab (e.g. to bookmark the selected tab via a $location.search() parameter etc. So rather than having to add a select() to each <tab> just add a select function on <tabset> or just bind the selected tab's heading (or tab object) to some model so that the outer controller can read the selection and ideally so that the outer controller can change the selected tab

@wesleycho
Copy link
Contributor

The main issue with this request I have is that this seems like this would add a bunch of complexity in order to support this feature, which would result in a lot of code & overhead that many do not need.

We favor extensibility over configuration due to the complexity and bloat that configuration ends up adding. What are your thoughts given this?

@jstrachan
Copy link
Author

maybe we need a separate selectable-tabset directive?

@icfantv
Copy link
Contributor

icfantv commented Jan 6, 2016

@jstrachan, that solution would result in a fair amount of duplicate code.

@wesleycho, what do you think about adding a method to UibTabsetController to return the active tab? That would be a really straight-forward mod. @jstrachan, would that suffice for your needs?

@wesleycho
Copy link
Contributor

@icfantv we have #4836 for making a breaking change in the tab API - we got it wrong, comparing it to the accordion API makes it clear.

@icfantv
Copy link
Contributor

icfantv commented Jan 6, 2016

Ah, ok. I didn't see that. Thanks.

@wesleycho
Copy link
Contributor

Going to close this as a duplicate of #4836 - any api signature discussion should be in there when we do make this change to how the tabs are used.

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

No branches or pull requests

3 participants