mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 21:31:12 +08:00
Fix ui-grid sortDirectionCycle type (#16753)
This commit is contained in:
committed by
Mohamed Hegazy
parent
0293efc435
commit
e65f837f20
2
types/ui-grid/index.d.ts
vendored
2
types/ui-grid/index.d.ts
vendored
@@ -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'
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user