From c85b07a4d191bbcd9ab0c3c4fd570fa84d8874b1 Mon Sep 17 00:00:00 2001 From: MatejQ Date: Fri, 18 Sep 2015 17:07:42 +0200 Subject: [PATCH 1/3] 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; From cb7020a0564c613855354a5265485287675b5bde Mon Sep 17 00:00:00 2001 From: MatejQ Date: Tue, 22 Sep 2015 13:22:37 +0200 Subject: [PATCH 2/3] Fixed incorrect IGridOptions.rowEquality() signature --- ui-grid/ui-grid.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui-grid/ui-grid.d.ts b/ui-grid/ui-grid.d.ts index 27e2e1fff..3a58fdfa4 100644 --- a/ui-grid/ui-grid.d.ts +++ b/ui-grid/ui-grid.d.ts @@ -809,10 +809,10 @@ declare module uiGrid { /** * By default, rows are compared using object equality. This option can be overridden * to compare on any data item property or function - * @param {IGridRow} entityA First Data Item to compare - * @param {IGridRow} entityB Second Data Item to compare + * @param {any} entityA First Data Item to compare + * @param {any} entityB Second Data Item to compare */ - rowEquality?(entityA: IGridRow, entityB: IGridRow): boolean; + rowEquality?(entityA: any, entityB: any): boolean; /** * This function is used to get and, if necessary, set the value uniquely identifying this row * (i.e. if an identity is not present it will set one). From b0b6e9ea4941f04b4039b25054e5057abbf533e9 Mon Sep 17 00:00:00 2001 From: MatejQ Date: Tue, 22 Sep 2015 13:26:36 +0200 Subject: [PATCH 3/3] Revert "Added missing on.sortChanged" This reverts commit c85b07a4d191bbcd9ab0c3c4fd570fa84d8874b1. --- ui-grid/ui-grid.d.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/ui-grid/ui-grid.d.ts b/ui-grid/ui-grid.d.ts index 3a58fdfa4..ece964280 100644 --- a/ui-grid/ui-grid.d.ts +++ b/ui-grid/ui-grid.d.ts @@ -998,12 +998,6 @@ 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 @@ -1074,15 +1068,6 @@ 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 @@ -1143,7 +1128,6 @@ 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;