Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

mdTabs: md-on-select gets called incorrectly #868

Closed
alanrussian opened this issue Dec 6, 2014 · 1 comment
Closed

mdTabs: md-on-select gets called incorrectly #868

alanrussian opened this issue Dec 6, 2014 · 1 comment
Assignees
Milestone

Comments

@alanrussian
Copy link

I have a (perhaps) strange use case of tabs where there is the possibility of none being selected (i.e., all have md-active="false"). If I create a page with tabs where they are all set to inactive, no tab will be selected/highlighted (correct behavior); however, md-on-select gets called as many times as there are tabs, whereas I would expect and desire it to not be called at all.

Demo: http://plnkr.co/edit/gTOvhd55bCF7DYinQOF2?p=preview

In the demo, I believe that nothing should be displayed under "Selected Tabs" until the user selects a tab.

Thanks for your help and hard work on this project! It's awesome!

@ThomasBurleson ThomasBurleson added this to the 0.7.0-rc1 milestone Dec 6, 2014
@ThomasBurleson ThomasBurleson changed the title Tabs: md-on-select gets called incorrectly mdTabs: md-on-select gets called incorrectly Dec 6, 2014
@alanrussian
Copy link
Author

I doubt this affects anyone else, but you can set md-selected to "-2" as a temporary fix.

If the fix is as simple as adding a check on that condition to evaluate the tab's selected value, I'd be happy to create/submit the fix -- whatever works best for you guys. :-)

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