-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Upon tab reapearing selection is not taken into account #1777
Comments
Hello, I'm not any expert, but... Regarding your first issue. The index md-selected is taken into account. The problem is that when you remove the tabs from the dom (which is what ng-if does) that index is set to -1, which you can clearly see in your output. To fix that without a watch you can assign a function to the click instead of doing a x assignation. In that function you store the index before you change the value of x. Here is a codepen to see what I'm talking about. Regarding the second issue. First and foremost I see an error when the index is changed while the tabs are hidden. I changed the line 191 of paginationDirective.js to currentPage = currentPage || {};
currentPage.lastTabIndex = index;
currentPage.tabs = currentPage.tabs || []; which fixes the error. A fix would be to set the width in the css with !important. But that only if you don't need a fluid layout. |
BREAKING CHANGE: Generated HTML structure has changed, so custom styles will need to be updated to match the new HTML structure. Closes #1087 Closes #1107 Closes #1140 Closes #1247 Closes #1261 Closes #1380 Closes #1387 Closes #1403 Closes #1443 Closes #1505 Closes #1506 Closes #1516 Closes #1518 Closes #1564 Closes #1570 Closes #1620 Closes #1626 Closes #1698 Closes #1777 Closes #1788 Closes #1850 Closes #1959 Closes #1986
BREAKING CHANGE: Generated HTML structure has changed, so custom styles will need to be updated to match the new HTML structure. Closes #1087 Closes #1107 Closes #1140 Closes #1247 Closes #1261 Closes #1380 Closes #1387 Closes #1403 Closes #1443 Closes #1505 Closes #1506 Closes #1516 Closes #1518 Closes #1564 Closes #1570 Closes #1620 Closes #1626 Closes #1698 Closes #1777 Closes #1788 Closes #1850 Closes #1959 Closes #1986
BREAKING CHANGE: Generated HTML structure has changed, so custom styles will need to be updated to match the new HTML structure. Closes #1087 Closes #1107 Closes #1140 Closes #1247 Closes #1261 Closes #1380 Closes #1387 Closes #1403 Closes #1443 Closes #1505 Closes #1506 Closes #1516 Closes #1518 Closes #1564 Closes #1570 Closes #1620 Closes #1626 Closes #1698 Closes #1777 Closes #1788 Closes #1850 Closes #1959 Closes #1986
BREAKING CHANGE: Generated HTML structure has changed, so custom styles will need to be updated to match the new HTML structure. Closes #1087 Closes #1107 Closes #1140 Closes #1247 Closes #1261 Closes #1380 Closes #1387 Closes #1403 Closes #1443 Closes #1505 Closes #1506 Closes #1516 Closes #1518 Closes #1564 Closes #1570 Closes #1620 Closes #1626 Closes #1698 Closes #1777 Closes #1788 Closes #1850 Closes #1959 Closes #1986 Closes #2020
BREAKING CHANGE: Generated HTML structure has changed, so custom styles will need to be updated to match the new HTML structure. Closes #1087 Closes #1107 Closes #1140 Closes #1247 Closes #1261 Closes #1380 Closes #1387 Closes #1403 Closes #1443 Closes #1505 Closes #1506 Closes #1516 Closes #1518 Closes #1564 Closes #1570 Closes #1620 Closes #1626 Closes #1698 Closes #1777 Closes #1788 Closes #1850 Closes #1959 Closes #1986 Closes #2020
First of all, I never mentioned how I LOVE this angular-material project.
Here's the codepen example:
http://codepen.io/yccteam/pen/GgGbzO
The issue is this:
ng-if
- works great.The problem is:
is satisfied and shows the tabs again. but
md-select`` isn't taken into account once the tabs reappear.I've also added the "ng-show" for sports (just click "Change SHOW" to play with it).
It works, but now I need to take care of the
md-bar
, which is external to the tab itself.I currently sove this using a hack with a watcher that sorts things out, but using a watcher while I already have a watcher (
ng-if
) seems very... hackish...Is this behavior intentional? Any way to solve this within the API?
Added later:
I've added another functionality that recreates a bug in the tabs:
The text was updated successfully, but these errors were encountered: