We've just discovered that our UI-Grid sort order is missing when we select the "Export all data as csv" option, whereas our "Export visible data as csv" is sorted as we have defined in the columns-defs. According to this it is because the visible-rows cache is what is sorted, but the underlying grid.rows is not (which is what the export-all-rows uses).
We've found a rough work-around by sorting the data just prior to applying the data to the grid, ie:
const sortedData = sortData(data);
$scope.gridOptions.grid = sortedData;
However it seems as though there should be a more elegant already-established pattern for this that doesn't involve pre-sorting the data and is handled by the grid itself. Has anyone else found a better way to do this?
Thanks