Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Error with ngRepeat + $filter + $.orderable() #7318

Closed
ghost opened this issue Apr 30, 2014 · 2 comments
Closed

Error with ngRepeat + $filter + $.orderable() #7318

ghost opened this issue Apr 30, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 30, 2014

I've created a plunker to show the error:

http://plnkr.co/edit/C64fRUQycG2aplmMFZks?p=preview

There's a strange behavior using angular version 1.2.15.

After an operation of drag-n-drop (using jquery.orderable), the filter doesn't work as expected.

How test it:
I tried with two versions of angular (1.1.5 and 1.2.15). The error only occurs at 1.2.15.

How to reproduce:

  1. Insert 'LL' as search text (will show just two rows)
  2. Delete the search text content and drag-n-drop the first row (Intant Earthquake and drop at 2nd row).
  3. Use the same text to search ('LL'). Will show just one row.
  4. Delete the search text content, will show just three rows.
  5. Write something to clean the list (ex. asdasdasd) and delete everything.
  6. Will show the whole list
@lord2800
Copy link

lord2800 commented May 2, 2014

This is because of the comment node that ngRepeat adds. You can't (manually or otherwise) reorder the list without also moving the comment node to match the new position.

@ghost
Copy link
Author

ghost commented May 2, 2014

I've changed to angular ui-sortable and worked like a charm.

I'll close this issue.

@ghost ghost closed this as completed May 2, 2014
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant