Skip to content
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

Pivot Control - SelectedIndex/Item attributes are not working #54

Closed
P4trik opened this issue Jul 30, 2015 · 2 comments
Closed

Pivot Control - SelectedIndex/Item attributes are not working #54

P4trik opened this issue Jul 30, 2015 · 2 comments

Comments

@P4trik
Copy link

P4trik commented Jul 30, 2015

If I declare the "selected-index" property of the win-pivot control, nothing is happen.
Maybe I use it in a wrong manner. A more detailed documentation or examples would be nice.

<win-pivot selected-index='1'> win-pivot-item header="'Header1'">Item1</win-pivot-item> win-pivot-item header="'Header2'">Item2</win-pivot-item> </win-pivot>

Best regards

@P4trik P4trik changed the title Pivot Control - SelectedIndex/Item doesn't work Pivot Control - SelectedIndex/Item attributes are not working Jul 30, 2015
@AmazingJaze
Copy link
Contributor

Hi @P4trik , thanks for reporting this, It looks like a duplicate of the same behavior that was called out more generally in #45.
If you would like to help us improve the angular-winjs adapter better faster, we are actively encouraging pull requests for issues like these.

@jdalton jdalton closed this as completed Sep 8, 2015
@sondreb
Copy link
Contributor

sondreb commented Oct 19, 2015

Which commit fixes the binding of selected-index and selected-item on the pivot control? Appears both this and #45 are closed, though I can't see any commits that have changed the code in the repo for 2 months?

My workaround for now:

$scope.selectedItem = null;
$scope.selectedIndex = -1;

$scope.tabChanged = function () {
    var tabProfileElement = document.getElementById('tabProfile');
    $scope.selectedIndex = tabProfileElement.winControl.selectedIndex;
    $scope.selectedItem = tabProfileElement.winControl.selectedItem;
};

Markup:

<win-pivot id="tabProfile" on-selection-changed="tabChanged()">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants