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

Ionic list reorder problem #210

Open
yckspo opened this issue Aug 18, 2016 · 0 comments
Open

Ionic list reorder problem #210

yckspo opened this issue Aug 18, 2016 · 0 comments

Comments

@yckspo
Copy link

yckspo commented Aug 18, 2016

Hello,
I modified the demo app, friends.html and FriendsCtrl, to have a list with ng-repeat and reorder.
The problem: When i start dragging any list item, shadow of item is already few items below, which is the same distance between top of the page and start point of the box.

Any hint how to fix this? Thank you!

reorderproblem

friends.html:

<ion-view view-title="Friends">
    <ion-content ng-class="{expanded:isExpanded}">
        <div class="content has-header">
        <ion-list show-reorder="true" can-reorder="true">
            <ion-item class="item-icon-right card"
            ng-repeat="list in lists track by list.id" >
                <span class="item-text-wrap" style="font-size: 18px" >{{list.description}} </span>
                <ion-reorder-button class="button ion-drag button-right" on-reorder="move(list, $fromIndex, $toIndex)"> </ion-reorder-button>
            </ion-item>
        </ion-list>
        </div>
    </ion-content>
</ion-view>
.controller('FriendsCtrl', function($scope, $stateParams, $timeout, ionicMaterialInk, ionicMaterialMotion) {
    // Set Header
    $scope.$parent.showHeader();
    $scope.$parent.clearFabs();
    $scope.$parent.setHeaderFab('left');

    // Delay expansion
    $timeout(function() {
        $scope.isExpanded = true;
        $scope.$parent.setExpanded(true);
    }, 300);

    // // Set Motion
    // ionicMaterialMotion.fadeSlideInRight();

    // // Set Ink
    // ionicMaterialInk.displayEffect();

    $scope.lists = [
      { id: 'item1',description: 'Item1'},
      { id: 'item2',description: 'Item2'},
      { id: 'item3',description: 'Item3'},
      { id: 'item4',description: 'Item4'},
      { id: 'item5',description: 'Item5'},
      { id: 'item6',description: 'Item6'},
      ];
})
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

No branches or pull requests

1 participant