Drag and drop ordering doesn't work well when filter is applied
#4384 opened on Jul 12, 2017
Description
Expected behavior
When filtering a list, drag and drop re-ordering should place list items in the correct order (within the context of the filtered items).
Actual/Current behavior
When an item is dragged into a new position in the list, it's sortOrder is being set to it's position in the current list (which may not be the correct value when some items have been filtered out).
Steps to reproduce the actual/current behavior
For example, if I'm filtering my list in such a way that shows items with sortOrders of 1,5, 6 and 7, If I drag the fourth item (with sort order of 7) above the third item (with sort order of 6) it's sort order is then updated to '3' (it's position in the current filtered list), meaning that the items now have sort orders on 1, 5, 3 and 7 and have in fact have been put into an incorrect order.
I can see where list.model.reorderItems is being called but I'm having trouble finding where this is defined in order to take a look at this myself.
Environment
| Software | Version |
|---|---|
| Keystone | 4.0.0-beta.5 |
| Node | 6.9.4 |