Clone
Mihai Chira
committed
on 25 Jul 15
FLEX-34837 CAUSE: DataGrid never had a mechanism by which it could monitor changes to the complex dataFields (e.g. "address.street") of the … Show more
FLEX-34837 CAUSE: DataGrid never had a mechanism by which it could monitor changes to the complex dataFields (e.g. "address.street") of the items in its dataProvider. Because of this, it couldn't ask for the collection to re-sort its items when one of these values changed. The best it could do was to keep track of when these values changed through its GridItemEditor, which it could detect.

SOLUTION: Now ListCollectionView can be asked (by DataGrid.ensureComplexFieldsMonitoring) to monitor all changes to the complex fields by which it's sorted (through the ComplexFieldChangeWatcher). Whenever one of them changes, the collection is resorted. Also, the sorting that GridColumn used to do through one of its own sortFunctions, is now left to Sort and SortField to do, as they've specialized in complex fields as well.

NOTES:

-This also means that GridItemEditor doesn't need to manually dispatch an itemUpdated event each time an item has been edited through it.

Show less

master + 4 more