Skip to content

fix: fixed the nested tabs selected, initialize property $tabSelected. #3157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Conversation

abruzzihraig
Copy link

Like the issue #1276
if you have some nested tabs, you select a sub-tab item, and you will
active some other siblings, because when tabCtrl add every new $scope,
it does't has a initial attr $scope.$tabSelected, so every
unselected item will read the $tabSelected from inherited
$parent, but if the parent-tab has been actived, the all of its
sub-tabs will read this true property in $scope.$tabSelected.

So I think we should initialize the property $scope.$tabSelected before
invoking tabsCtrl.add(), and every tab-item will has a 'false' status
for a initial $scope.$tabSelected.

…elected.

Like the issue #1276
if you have some nested tabs, you select a sub-tab item, and you will
active some other siblings, because when tabCtrl add every new $scope,
it does't has a initial attr $scope.$tabSelected, so every
unselected item will read the $tabSelected from inherited
$parent, but if the parent-tab has been actived, the all of its
sub-tabs will read this true property in $scope.$tabSelected.

So I think we should initialize the property $scope.$tabSelected before
invoking tabsCtrl.add(), and every tab-item will has a 'false' status
for a initial $scope.$tabSelected.
In general a element, it is available to use the directive
nav-direction, but in directive ion-item, it will build an anchor
element by its template ITEM_TPL_CONTENT_ANCHOR, it doesn't has the
nav-direction attribute, so I updated the ITEM_TPL_CONTENT_ANCHOR and
add a proxy function $navDirection in directive ion-item.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant