-
Notifications
You must be signed in to change notification settings - Fork 3.4k
md-on-select not called when deleting tabs #2730
Comments
I realize that the log output does not come from md-on-select, but the behavior is the same for me. |
Ok, I created a plnkr: Either open the chrome console or look at the "Last Log:" line at the bottom which is updated by the function defined in the md-on-select declaration. There, the second issue I experienced also becomes visible: If you like I can create a 2nd issue for that. |
+1 |
Not exactly the same, but was having problems with mdTabs after 1) removing some tabs, 2) closing the mdTabs element, 3) reopening the mdTabs element with some newly reattached tabs. Had to go into mdTabs directive to fix. The scope must be explicitly deleted when mdTabs element is destroyed, or when a new MdTabsController spins up, BOTH the new and old controllers are watching/manipulating the same data, causing any number of defective behaviors. Here is what was added... function MdTabs ($mdTheming, $mdUtil, $compile) {
|
Should be resolved by 5e47b52 |
According to the docs the md-on-select should be called "after the tab has been selected".
However, this fails to work when you remove tabs.
This becomes apparent in the dynamic tabs demo on
https://material.angularjs.org/#/demo/material.components.tabs
If you have an open chrome console when you switch tabs you can see logs like:
Goodbye Two!
Hello Eight!
Goodbye Eight!
If you select e.g. tab page 3 and delete it there is no such output afterwards even though tab 4 is now selected.
It only works if you open the very last tab and delete it:
Hello Ten!
now click delete
Goodbye Ten!
Hello Nine!
The text was updated successfully, but these errors were encountered: