mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Merge pull request #24288 from pbojanczyk/master
ui-grid: added defaultSort property to columnDef
This commit is contained in:
8
types/ui-grid/index.d.ts
vendored
8
types/ui-grid/index.d.ts
vendored
@@ -1,6 +1,8 @@
|
||||
// Type definitions for ui-grid
|
||||
// Project: http://www.ui-grid.info/
|
||||
// Definitions by: Ben Tesser <https://github.com/btesser>, Joe Skeen <https://github.com/joeskeen>
|
||||
// Definitions by: Ben Tesser <https://github.com/btesser>
|
||||
// Joe Skeen <https://github.com/joeskeen>
|
||||
// Peter Bojanczyk <https://github.com/pbojanczyk>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -3545,6 +3547,8 @@ declare namespace uiGrid {
|
||||
export interface IGridColumnOf<TEntity> {
|
||||
/** Column definition */
|
||||
colDef: uiGrid.IColumnDefOf<TEntity>;
|
||||
/** Default sort on this column */
|
||||
defaultSort?: ISortInfo;
|
||||
/**
|
||||
* Column name that will be shown in the header.
|
||||
* If displayName is not provided then one is generated using the name.
|
||||
@@ -3683,6 +3687,8 @@ declare namespace uiGrid {
|
||||
* @default false
|
||||
*/
|
||||
cellTooltip?: boolean | string | ICellTooltipGetter<TEntity>;
|
||||
/** Default object of sort information */
|
||||
defaultSort?: ISortInfo;
|
||||
/**
|
||||
* Column name that will be shown in the header.
|
||||
* If displayName is not provided then one is generated using the name.
|
||||
|
||||
@@ -22,6 +22,11 @@ columnDef.cellTooltip = 'blah';
|
||||
columnDef.cellTooltip = function (gridRow: uiGrid.IGridRow, gridCol: uiGrid.IGridColumn) {
|
||||
return `${gridRow.entity.unknownProperty}-${gridCol.displayName}`;
|
||||
};
|
||||
columnDef.defaultSort = {
|
||||
direction: 'ASC',
|
||||
ignoreSort: false,
|
||||
priority: 1
|
||||
};
|
||||
columnDef.displayName = 'Jumper';
|
||||
columnDef.enableColumnMenu = false;
|
||||
columnDef.enableColumnMenus = false;
|
||||
|
||||
Reference in New Issue
Block a user