Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

After dropping a dragged item a delay occurs as the data does the sorting #504

Open
mtpultz opened this issue Feb 10, 2017 · 4 comments
Open

Comments

@mtpultz
Copy link

mtpultz commented Feb 10, 2017

A dataset of 300 records in a table using ui-sortable has a 3-4 second delay after the item being dragged is dropped that appears to be related to sorting the newly ordered data that prevents any actions from occurring until complete, which includes any further dragging and even scrolling the page.

@thgreasi
Copy link
Contributor

Hi there. It might be the ng-repeat that's re-rendering that causes the issue. Are you using the track by statement in your ng-repeat and are you taking a unique property?

@mtpultz
Copy link
Author

mtpultz commented Feb 10, 2017

Hi @thgreasi, yah I'm using track by and a unique database ID. This is a snippet of the markup.

<tbody ui-sortable="vm.sortableOptions"
       ng-model="vm.agencies">

    <tr ng-repeat="agency in vm.agencies track by agency.id">

        <td data-title="'Sort Order'"
               data-label="Sort Order"
               title="Sort Order">

            {{ agency.sortorder }}

        </td>

@c0r3yz
Copy link

c0r3yz commented Mar 2, 2017

I'm experiencing a similar situation, has there been any resolution for this yet?

@thgreasi
Copy link
Contributor

thgreasi commented Mar 7, 2017

I created an example pen to demonstrate this, but I'm not usre how we can handle it.

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

No branches or pull requests

3 participants