You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 29, 2019. It is now read-only.
We just updated from [email protected] to [email protected] which moves active from each uib-tab to the containing uib-tabset. While this simplifies the amount of tags/code/etc, the only way to set an active tab is via index value. Indices are very error prone and typically a nightmare to manage, especially when adding or removing tabs as development and/or client requirements change.
How our team used active in [email protected] was along the lines of:
Then in our JavaScript, we were able to simply do $scope.foobarActive = true; which set Foobar visible. This meant no matter the order of the tabs, addition of new tabs, or removal of unwanted tabs the JavaScript wouldn't have the potential of breaking as easily as an indice change.
In [email protected], we clearly have to use an index (being 0 or 1 for the previous example). However, we'd like to request the ability to set via a name (or maybe object pointer???), such as:
Then in our JavaScript, something like $scope.activeTab = 'Foobar'; (or some kind of unique key) would set Foobar visible. With this example if we put tab 123 in between Foobar and ABC, then all references to ABC expecting it to be at index 1 would now be broken.
Angular: 1.5
UIBS: 1.2.5
Bootstrap: 3.3.6
The text was updated successfully, but these errors were encountered:
@twh1808, while we appreciate the thorough write up, please be respectful of our time by extending us the courtesy of searching existing issues as this is a duplicate of #5687 and corresponding PR #5577 (which is still waiting a response from the original submitter).
@icfantv, I did review the PRs and Issues and I did take note of the ones you're referencing. However, based on the confusing name of index (since I believe most expect that to be an 0-based integer) and the minimal details it appeared as that was attempting to fix things like activeTab = '1' where the typeof activeTab === 'string' and not actually a number.
I see now after digging deeper into the source that index is really "any old value" so this does become a duplicate.
We just updated from
[email protected]
to[email protected]
which movesactive
from eachuib-tab
to the containinguib-tabset
. While this simplifies the amount of tags/code/etc, the only way to set an active tab is via index value. Indices are very error prone and typically a nightmare to manage, especially when adding or removing tabs as development and/or client requirements change.How our team used
active
in[email protected]
was along the lines of:Then in our JavaScript, we were able to simply do
$scope.foobarActive = true;
which setFoobar
visible. This meant no matter the order of the tabs, addition of new tabs, or removal of unwanted tabs the JavaScript wouldn't have the potential of breaking as easily as an indice change.In
[email protected]
, we clearly have to use an index (being0
or1
for the previous example). However, we'd like to request the ability to set via a name (or maybe object pointer???), such as:Then in our JavaScript, something like
$scope.activeTab = 'Foobar';
(or some kind of unique key) would setFoobar
visible. With this example if we put tab123
in betweenFoobar
andABC
, then all references toABC
expecting it to be at index1
would now be broken.Angular: 1.5
UIBS: 1.2.5
Bootstrap: 3.3.6
The text was updated successfully, but these errors were encountered: