-
Notifications
You must be signed in to change notification settings - Fork 67
ngRepeat with orderBy problem #123
Comments
|
You're right, in Chrome your example seems to work just fine but the first time I've tried with IE (v11.0.9600.18537 running on Win7 SP1). If you simply drag an element from the left container and drop on the other one it simply disappears. My problem with the orderBy instead occurs even in Chrome. |
Ok I will check IE problem later tonight, and also try orderBy, let you know then. |
There are some weird things happening, I will be solving this for a while, let you know when come up with something.. |
Thanks a lot!! If you could solve the orderBy issue it would be reeeeally appreciated :) |
Have you tried the same code like in example above but replacing |
I have tested orderBy filter combined with this example and it worked well ;)
|
I have confirmed issue on IE, so I made separate github issue for it, not to be mixed with orderBy issue. Please tell me if my modification of getFilteredModel function worked for you. Thanks ;) |
Yes, it seems to work but as long as I order by a "root" property of the list. With something like:
it works but if I try:
or the combined syntax:
it seems to mix up indexes and elements start acting strange (even in chrome) |
I have tested 'property.property' case and it works well when you move items from one container to another. It only have problem when you move item inside one container. Problem description: In case of using orderBy filter sometimes items in model dont change position after drop, so angular dont redraw the ng-repeat view and so this is the problem where item get lost.. in model it still exists, but in view it never become redrawn unless model changed. My test code:
|
I will be thinking about the solution and let you know when come out with something. |
This is very complicated situation, how to handle the case when item from same container is dropped but view is not changed because it is ordered into same order. Here is what is happening after drop:
I was looking for something to tell ng-repeat to redraw its content, but did not found anything simple enough So I recommend not allowing sorting in containers using orderBy filters! Until someone becomes with better soluton. Sorry for problems, but I cannot handle every possible scenario. PS: |
Well, I'll definetly wait for your next library then :) |
I have a problem when I try to apply an orderBy to the ngRepeat because when I reorder an item it disappears from the container. Should I treat the orderBy like a normal filter? In that case I've seen this example:
http://luckylooke.github.io/dragular/#/docs/exampleNgRepeatFilteredWithModel
But even here when I move an item from left to right it disappears.
Any help?
The text was updated successfully, but these errors were encountered: