Fix ui-grid sortDirectionCycle type (#16753)

This commit is contained in:
Primož Hadalin
2017-06-02 00:07:11 +02:00
committed by Mohamed Hegazy
parent 0293efc435
commit e65f837f20
2 changed files with 2 additions and 1 deletions

View File

@@ -3799,7 +3799,7 @@ declare namespace uiGrid {
* If suppressRemoveSort is also set, the unsorted state will be skipped even if it is listed here. Each direction may
* not appear in the list more than once (e.g. [ASC, DESC, DESC] is not allowed), and the list may not be empty.*
*/
sortDirectionCycle?: Array<IUiGridConstants>;
sortDirectionCycle?: Array<null | string>;
/**
* Algorithm to use for sorting this column. Takes 'a' and 'b' parameters
* like any normal sorting function with additional 'rowA', 'rowB', and 'direction'

View File

@@ -93,6 +93,7 @@ columnDef.sort = {
priority: 1
};
columnDef.sortCellFiltered = false;
columnDef.sortDirectionCycle = [null, 'asc' , 'desc'];
columnDef.sortingAlgorithm = (a: any, b: any, rowA: uiGrid.IGridRowOf<IMyEntity>, rowB: uiGrid.IGridRowOf<IMyEntity>, direction: string) => {
return -1;
};