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

tab active issue #5558

Closed
sebius8780 opened this issue Mar 1, 2016 · 2 comments
Closed

tab active issue #5558

sebius8780 opened this issue Mar 1, 2016 · 2 comments

Comments

@sebius8780
Copy link

Hello there and first of all : thank you for uib !

I am working with tab-set and tab but I have some issues regarding the active parameter.

Here is my html code :

<uib-tabset class="tab-container" sortableTab>
    <uib-tab sortable-tab ng-repeat="tab in primaryTabs" active="tab.active" tab-highlight>
        <uib-tab-heading>
        <span title="{{tab.title}}">{{tab.title}}</span> <i class="glyphicon glyphicon-remove" ng-click="removeTab($event, $index)"></i>
        </uib-tab-heading>
       <iframe class="panelsLarge" ng-show="!(tab.currentForm == '')"
            id="maincontentForm" ng-src="{{ tab.currentForm }}">
       </iframe>
    </uib-tab>
</uib-tabset>

But when I add a tab ( with a push within primaryTabs ) the tab added is not automatically active, and is not shown as the current tab, by changing the code at line 5544 :
if (/*tab.index === ctrl.active*/tab.index != ctrl.active ||
I was able to correct it.
Another issue ( that is similar ) is when I set the active property of the tab to true, the watcher doesn't seems to react ... so my tab is not shown as the current active one neither.

this was working for me with the same html / js code, I only changed to higher versions of bootstrap / angularJS.

Angular: 1.4.9

Bootstrap: ui-bootstrap-tpls-1.2.1.js

Thank you for your help !

@icfantv
Copy link
Contributor

icfantv commented Mar 1, 2016

@sebius8780, please be respectful of our time by reading both open and closed issues and also reading the CHANGELOG (all of which is documented in the link provided in the text you deleted to enter your issue).

There was a breaking change in the 1.2.0 release for tabs. You cannot set a tab to active by simply toggling a tab's active state. You must do it at the tabset level via the active property. Please note that the demo page is currently broken in this regard but see the linked issue below for a working example.

Closing as duplicate of #5551.

@sebius8780
Copy link
Author

Hello,
Thank you for your answer and i am really sorry for not looking into the changelog.
It is true that the fact that the demo is not synch with the last version available on the same page is a bit confusing. I can see others are having the same issue i had with that.
Again, sorry, and keep the excellent work !

Thank you,

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

2 participants