From c85b07a4d191bbcd9ab0c3c4fd570fa84d8874b1 Mon Sep 17 00:00:00 2001 From: MatejQ Date: Fri, 18 Sep 2015 17:07:42 +0200 Subject: [PATCH] Added missing on.sortChanged --- ui-grid/ui-grid.d.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ui-grid/ui-grid.d.ts b/ui-grid/ui-grid.d.ts index 16f2e1fde..27e2e1fff 100644 --- a/ui-grid/ui-grid.d.ts +++ b/ui-grid/ui-grid.d.ts @@ -998,6 +998,12 @@ declare module uiGrid { * @param {rowsVisibleChangedHandler} handler callback */ rowsVisibleChanged: (scope: ng.IScope, handler: rowsVisibleChangedHandler) => void; + /** + * is raised after the sort criteria on one or more columns has changed + * @param {ng.IScope} scope Grid scope + * @param {rowsVisibleChangedHandler} handler callback + */ + sortChanged: (scope: ng.IScope, handler: sortChangedHandler) => void; /** * is raised when scroll begins. Is throttled, so won't be raised too frequently * @param {ng.IScope} scope Grid scope @@ -1068,6 +1074,15 @@ declare module uiGrid { (scrollEvent: JQueryMouseEventObject): void; } + export interface sortChangedHandler { + /** + * Sort change event callback + * @param {IGridInstance} grid instance + * @param {IGridColumn} array of gridColumns that have sorting on them, sorted in priority order + */ + (grid: IGridInstance, columns: IGridColumn[]): void; + } + export module cellNav { /** * Column Definitions for cellNav feature, these are available to be set using the ui-grid @@ -1128,6 +1143,7 @@ declare module uiGrid { * Brings the specified row and column into view, and sets focus to that cell * @param {any} rowEntity gridOptions.data[] array instance to make visible and set focus * @param {IColumnDef} colDef Column definition to make visible and set focus + * @returns {ng.IPromise} a promise that is resolved after any scrolling is finished */ scrollToFocus(rowEntity: any, colDef: IColumnDef): ng.IPromise;