Clone
Mihai Chira
committed
on 20 May 15
FLEX-34838 CAUSE: When there is a column sort applied, GridItemEditor.save() is fooling the grid dataProvider into thinking that it's correc… Show more
FLEX-34838 CAUSE: When there is a column sort applied, GridItemEditor.save() is fooling the grid dataProvider into thinking that it's correctly sorted when it's not: by setting dataProvider.sort = null, making the desired change, and then re-setting the sort, the currently-edited row stays in the same position, but the dataProvider now believes the selectedItem is in the correct position given the sort (I say that because ListCollectionView.getItemIndex() uses the sort when it's not null, but that only works if all the items are correctly sorted).

SOLUTION:

GridItemEditor doesn't do the sort ignoring trick anymore, which means that if needed, the currently selected row will jump to another location based on the sorting rule, and that getItemIndex() will work correclty. To compensate for the row potentially jumping to another location, Grid now scrolls to where the item has landed.

Show less

master + 4 more