diff --git a/ui-grid/ui-grid-tests.ts b/ui-grid/ui-grid-tests.ts
index 21d42c021a..5b644d2fac 100644
--- a/ui-grid/ui-grid-tests.ts
+++ b/ui-grid/ui-grid-tests.ts
@@ -1,19 +1,25 @@
///
///
-var columnDef: uiGrid.IColumnDef;
+interface MyEntity {
+ name: string;
+ age: number;
+}
+
+var columnDef: uiGrid.IColumnDef;
columnDef.aggregationHideLabel = true;
columnDef.aggregationHideLabel = false;
columnDef.aggregationType = 1;
columnDef.aggregationType = function () { return 1; };
columnDef.cellClass = 'test';
-columnDef.cellClass = function (gridRow: uiGrid.IGridRow, gridCol: uiGrid.IGridColumn, index: number) {
+columnDef.cellClass = (gridRow, gridCol, index) => {
+ //types of gridRow, gridCol, and index are flowed in correctly
return 'pizza';
};
columnDef.cellFilter = 'date';
columnDef.cellTemplate = 'hello
';
columnDef.cellTooltip = 'blah';
-columnDef.cellTooltip = function (gridRow: uiGrid.IGridRow, gridCol: uiGrid.IGridColumn) {
+columnDef.cellTooltip = function (gridRow: uiGrid.IGridRow, gridCol: uiGrid.IGridColumn) {
return 'blah';
};
columnDef.displayName = 'Jumper';
@@ -38,15 +44,16 @@ columnDef.filter = {
columnDef.filterCellFiltered = false;
columnDef.filterHeaderTemplate = '';
columnDef.filters = [columnDef.filter];
-columnDef.footerCellClass =
- (gridRow: uiGrid.IGridRow, rowRenderIndex: number, gridCol: uiGrid.IGridColumn, colRenderIndex: number) => {
+columnDef.footerCellClass = (gridRow, rowRenderIndex, gridCol, colRenderIndex) => {
+ //types for gridRow, rowRenderIndex, gridCol, and colRenderIndex flow in properly
return 'blah';
};
columnDef.footerCellClass = 'theClass';
columnDef.footerCellFilter = 'currency:$';
columnDef.footerCellTemplate = '';
columnDef.headerCellClass =
- (gridRow: uiGrid.IGridRow, rowRenderIndex: number, gridCol: uiGrid.IGridColumn, colRenderIndex: number) => {
+ (gridRow, rowRenderIndex, gridCol, colRenderIndex) => {
+ //types for gridRow, rowRenderIndex, gridCol, and colRenderIndex flow in properly
return 'blah';
};
columnDef.headerCellClass = 'classy';
@@ -54,7 +61,8 @@ columnDef.headerCellFilter = 'currency:$';
columnDef.headerCellTemplate = '';
columnDef.headerTooltip = false;
columnDef.headerTooltip = 'The Tooltip';
-columnDef.headerTooltip = (col: uiGrid.IGridColumn) => {
+columnDef.headerTooltip = (col) => {
+ //type of col flows in properly
return 'tooly';
};
columnDef.maxWidth = 200;
@@ -87,10 +95,10 @@ columnDef.width = 100;
columnDef.width = '*';
-var gridApi: uiGrid.IGridApi;
-var gridInstance: uiGrid.IGridInstance;
+var gridApi: uiGrid.IGridApi;
+var gridInstance: uiGrid.IGridInstance;
var menuItem: uiGrid.IMenuItem;
-var colProcessor: uiGrid.IColumnProcessor;
+var colProcessor: uiGrid.IColumnProcessor;
gridApi.core.clearAllFilters(true);
gridApi.core.addToGridMenu(gridInstance, [menuItem]);
@@ -100,3 +108,11 @@ gridApi.core.queueGridRefresh()
gridApi.core.queueRefresh();
gridApi.core.registerColumnsProcessor(colProcessor, 100);
+var gridOptions: uiGrid.IGridOptions = {
+ data: [{name: 'Bob', age: 100}],
+ onRegisterApi: (api) => {
+ api.selection.on.rowSelectionChanged(null, (row) => {
+ console.log(row.entity.name);
+ })
+ }
+}
\ No newline at end of file
diff --git a/ui-grid/ui-grid.d.ts b/ui-grid/ui-grid.d.ts
index c41cac7c6a..42eb36efdf 100644
--- a/ui-grid/ui-grid.d.ts
+++ b/ui-grid/ui-grid.d.ts
@@ -120,12 +120,12 @@ declare module uiGrid {
ALWAYS: number;
}
}
- export interface IGridInstance {
+ export interface IGridInstance {
/**
* adds a row header column to the grid
* @param {IColumnDef} colDef The column definition
*/
- addRowHeaderColumn(colDef: IColumnDef): void;
+ addRowHeaderColumn(colDef: IColumnDef): void;
/**
* uses the first row of data to assign colDef.type for any types not defined.
*/
@@ -134,7 +134,7 @@ declare module uiGrid {
* Populates columnDefs from the provided data
* @param {IRowBuilder} rowBuilder function to be called
*/
- buildColumnDefsFromData(rowBuilder: IRowBuilder): void;
+ buildColumnDefsFromData(rowBuilder: IRowBuilder): void;
/**
* creates GridColumn objects from the columnDefinition.
* Calls each registered columnBuilder to further process the column
@@ -193,48 +193,48 @@ declare module uiGrid {
* @param {IGridColumn} col Column to access
* @returns {string} Cell display value
*/
- getCellDisplayValue(row: IGridRow, col: IGridColumn): string;
+ getCellDisplayValue(row: IGridRow, col: IGridColumn): string;
/**
* Gets the displayed value of a cell
* @param {IGridRow} row Row to access
* @param {IGridColumn} col Column to access
* @returns {any} Cell value
*/
- getCellValue(row: IGridRow, col: IGridColumn): any;
+ getCellValue(row: IGridRow, col: IGridColumn): any;
/**
* returns a grid colDef for the column name
* @param {string} name Column name
* @returns {IColumnDef} The column definition
*/
- getColDef(name: string): IColumnDef;
+ getColDef(name: string): IColumnDef;
/**
* returns a grid column by name
* @param {string} name Column name
* @returns {IGridColumn} The column
*/
- getColumn(name: string): IGridColumn;
+ getColumn(name: string): IGridColumn;
/**
* Return the columns that the grid is currently being sorted by
* @returns {Array} the columns that the grid is currently being sorted by
*/
- getColumnSorting(): Array;
+ getColumnSorting(): Array>;
/**
* Returns the $parse-able accessor for a column within its $scope
* @param {IGridColumn} col Column object
* @returns {string} $parse-able accessor for a column within its $scope
*/
- getGridQualifiedColField(col: IGridColumn): string;
+ getGridQualifiedColField(col: IGridColumn): string;
/**
* returns all columns except for rowHeader columns
* @returns {Array} All data columns
*/
- getOnlyDataColumns(): Array;
+ getOnlyDataColumns(): Array>;
/**
* returns the GridRow that contains the rowEntity
* @param {any} rowEntity the gridOptionms.data array element instance
* @param {Array} rows The rows to look in. if not provided then it looks in grid.rows
*/
- getRow(rowEntity: any, rows?: Array): IGridRow;
+ getRow(rowEntity: TEntity, rows?: Array>): IGridRow;
/**
* Triggered when the browser window resizes; automatically resizes the grid
* @param {ng.IAngularEvent} $event Resize event
@@ -270,7 +270,7 @@ declare module uiGrid {
* @param {IGridColumn} column The column
* @returns {boolean} true if the column is a row header
*/
- isRowHeaderColumn(column: IGridColumn): boolean;
+ isRowHeaderColumn(column: IGridColumn): boolean;
/**
* creates or removes GridRow objects from the newRawData array. Calls each registered
* rowBuilder to further process the row
@@ -309,7 +309,7 @@ declare module uiGrid {
* @param {IGridRow} gridRow reference to gridRow
* @returns {IGridRow} the gridRow with all additional behavior added
*/
- processRowBuilders(gridRow: IGridRow): IGridRow;
+ processRowBuilders(gridRow: IGridRow): IGridRow;
/**
* calls the row processors, specifically
* intended to reset the sorting when an edit is called,
@@ -360,7 +360,7 @@ declare module uiGrid {
* additional properties to the column.
* @param {IColumnBuilder} columnBuilder function to be called
*/
- registerColumnBuilder(columnBuilder: IColumnBuilder): void;
+ registerColumnBuilder(columnBuilder: IColumnBuilder): void;
/**
* Register a "columns processor" function. When the columns are updated,
* the grid calls each registered "columns processor", which has a chance
@@ -373,7 +373,7 @@ declare module uiGrid {
* for other people to inject columns processors at intermediate priorities.
* Lower priority columnsProcessors run earlier.priority
*/
- registerColumnsProcessor(columnProcessor: IColumnProcessor, priority: number): void;
+ registerColumnsProcessor(columnProcessor: IColumnProcessor, priority: number): void;
/**
* When a data change occurs, the data change callbacks of the specified type
* will be called. The rules are:
@@ -398,13 +398,13 @@ declare module uiGrid {
* ALL
* @returns {Function} deregister function - a function that can be called to deregister this callback
*/
- registerDataChangeCallback(callback: (grid: IGridInstance) => void, types: Array): Function;
+ registerDataChangeCallback(callback: (grid: IGridInstance) => void, types: Array): Function;
/**
* When the build creates rows from gridOptions.data, the rowBuilders will be called to add
* additional properties to the row.
* @param {IRowBuilder} rowBuilder Function to be called
*/
- registerRowBuilder(rowBuilder: IRowBuilder): void;
+ registerRowBuilder(rowBuilder: IRowBuilder): void;
/**
* Register a "rows processor" function. When the rows are updated,
* the grid calls each registered "rows processor", which has a chance
@@ -420,7 +420,7 @@ declare module uiGrid {
* is running at 50, filter is running at 100, sort is at 200, grouping at 400, selectable rows at
* 500, pagination at 900 (pagination will generally want to be last)
*/
- registerRowsProcessor(rowProcessor: IRowProcessor, priority: number): void;
+ registerRowsProcessor(rowProcessor: IRowProcessor, priority: number): void;
/**
* registered a styleComputation function
*
@@ -432,12 +432,12 @@ declare module uiGrid {
* Remove a registered rows processor
* @param {IRowProcessor} rows processor function
*/
- removeRowsProcessor(rows: IRowProcessor): void;
+ removeRowsProcessor(rows: IRowProcessor): void;
/**
* Return the columns that the grid is currently being sorted by
* @param {IGridColumn} [excludedColumn] Optional GridColumn to exclude from having its sorting reset
*/
- resetColumnSorting(excludedColumn: IGridColumn): void;
+ resetColumnSorting(excludedColumn: IGridColumn): void;
/**
* Scroll the grid such that the specified
* row and column is in view
@@ -445,7 +445,7 @@ declare module uiGrid {
* @param {IColumnDef} colDef to make visible
* @returns {ng.IPromise} a promise that is resolved after any scrolling is finished
*/
- scrollTo(rowEntity: IGridRow, colDef: IColumnDef): ng.IPromise;
+ scrollTo(rowEntity: IGridRow, colDef: IColumnDef): ng.IPromise;
/**
* Scrolls the grid to make a certain row and column combo visible,
* in the case that it is not completely visible on the screen already.
@@ -453,7 +453,7 @@ declare module uiGrid {
* @param {IGridColumn} gridCol column to make visible
* @returns {ng.IPromise} a promise that is resolved when scrolling is complete
*/
- scrollToIfNecessary(gridRow: IGridRow, gridCol: IGridColumn): ng.IPromise;
+ scrollToIfNecessary(gridRow: IGridRow, gridCol: IGridColumn): ng.IPromise;
/**
* Set the sorting on a given column, optionally resetting any existing sorting on the Grid.
* Emits the sortChanged event whenever the sort criteria are changed.
@@ -465,7 +465,7 @@ declare module uiGrid {
* reset any existing sorting and sort by this column only
* @returns {ng.IPromise} A resolved promise that supplies the column.
*/
- sortColumn(column: IGridColumn, direction?: string, add?: boolean): ng.IPromise;
+ sortColumn(column: IGridColumn, direction?: string, add?: boolean): ng.IPromise>;
/**
* flags all render containers to update their canvas height
*/
@@ -509,22 +509,22 @@ declare module uiGrid {
export interface IStyleComputation {
($scope: ng.IScope): string;
}
- export interface IColumnBuilder {
- (colDef: IColumnDef, col: IGridColumn, gridOptions: IGridOptions): void;
+ export interface IColumnBuilder {
+ (colDef: IColumnDef, col: IGridColumn, gridOptions: IGridOptions): void;
}
- export interface IRowBuilder {
- (row: IGridRow, gridOptions: IGridOptions): void;
+ export interface IRowBuilder {
+ (row: IGridRow, gridOptions: IGridOptions): void;
}
- export interface IRowProcessor {
- (renderedRowsToProcess: Array, columns: Array): Array;
+ export interface IRowProcessor {
+ (renderedRowsToProcess: Array>, columns: Array>): Array>;
}
- export interface IColumnProcessor {
- (renderedColumnsToProcess: Array, rows: Array): Array;
+ export interface IColumnProcessor {
+ (renderedColumnsToProcess: Array>, rows: Array>): Array>;
}
- export interface IGridOptions extends cellNav.IGridOptions, edit.IGridOptions, expandable.IGridOptions,
- exporter.IGridOptions, grouping.IGridOptions, importer.IGridOptions, infiniteScroll.IGridOptions,
+ export interface IGridOptions extends cellNav.IGridOptions, edit.IGridOptions, expandable.IGridOptions,
+ exporter.IGridOptions, grouping.IGridOptions, importer.IGridOptions, infiniteScroll.IGridOptions,
moveColumns.IGridOptions, pagination.IGridOptions, pinning.IGridOptions, resizeColumns.IGridOptions,
- rowEdit.IGridOptions, saveState.IGridOptions, selection.IGridOptions, treeBase.IGridOptions,
+ rowEdit.IGridOptions, saveState.IGridOptions, selection.IGridOptions, treeBase.IGridOptions,
treeView.IGridOptions {
/**
* Default time in milliseconds to throttle aggregation calcuations, defaults to 500ms
@@ -538,7 +538,7 @@ declare module uiGrid {
/**
* Array of columnDef objects. Only required property is name.
*/
- columnDefs?: Array;
+ columnDefs?: Array>;
/**
* The height of the footer rows (column footer and grid footer) in pixels
*/
@@ -582,7 +582,7 @@ declare module uiGrid {
* Where you do this, you need to take care in updating the data - you can't just update `$scope.myData` to some
* other array, you need to update $scope.gridOptions.data to point to that new array as well.
*/
- data?: Array | string;
+ data?: Array | string;
/**
* True by default. When enabled, this setting displays a column
* menu within each column.
@@ -733,7 +733,7 @@ declare module uiGrid {
* if needed
* @param {IGridApi} gridApi
*/
- onRegisterApi?: (gridApi: IGridApi) => void;
+ onRegisterApi?: (gridApi: IGridApi) => void;
/**
* The height of the row in pixels, defaults to 30
* @default 30
@@ -801,14 +801,14 @@ declare module uiGrid {
* @param {IGridRow} row The row for which you want the unique id
* @returns {string} row uid
*/
- getRowIdentity?(row: IGridRow): any;
+ getRowIdentity?(row: IGridRow): any;
/**
* 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
*/
- rowEquality?(entityA: IGridRow, entityB: IGridRow): boolean;
+ rowEquality?(entityA: IGridRow, entityB: IGridRow): 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).
@@ -818,13 +818,13 @@ declare module uiGrid {
*/
rowIdentity?(): any;
}
- export interface IGridCoreApi {
+ export interface IGridCoreApi {
// Methods
/**
* adds a row header column to the grid
* @param {IColumnDef} column Column Definition
*/
- addRowHeaderColumn(column: IColumnDef): void;
+ addRowHeaderColumn(column: IColumnDef): void;
/**
* add items to the grid menu. Used by features
* to add their menu items if they are enabled, can also be used by
@@ -838,7 +838,7 @@ declare module uiGrid {
* which is provided when you want to remove an item. The id should be unique.
*/
- addToGridMenu(grid: IGridInstance, items: Array): void;
+ addToGridMenu(grid: IGridInstance, items: Array): void;
/**
* Clears all filters and optionally refreshes the visible rows.
* @param {boolean} [refreshRows=true] Defaults to true.
@@ -847,7 +847,7 @@ declare module uiGrid {
* @returns {ng.IPromise} If `refreshRows` is true, returns a promise of the rows refreshing.
*/
clearAllFilters(refreshRows?: boolean, clearConditions?: boolean,
- clearFlags?: boolean): ng.IPromise>;
+ clearFlags?: boolean): ng.IPromise>>;
/**
* Clears any override on visibility for the row so that it returns to
* using normal filtering and other visibility calculations.
@@ -862,7 +862,7 @@ declare module uiGrid {
* @param {IGridInstance} grid the grid you want to get visible rows from
* @returns {Array} an array of gridRow
*/
- getVisibleRows(grid: IGridInstance): Array;
+ getVisibleRows(grid: IGridInstance): Array>;
/**
* Trigger a grid resize, normally this would be picked
* up by a watch on window size, but in some circumstances it is necessary
@@ -902,7 +902,7 @@ declare module uiGrid {
* At present allRowsVisible is running at 50, filter is running at 100, sort is at 200, grouping at 400,
* selectable rows at 500, pagination at 900 (pagination will generally want to be last)
*/
- registerColumnsProcessor(processorFunction: IColumnProcessor, priority: number): void;
+ registerColumnsProcessor(processorFunction: IColumnProcessor, priority: number): void;
/**
* Register a "rows processor" function. When the rows are updated,
* the grid calls each registered "rows processor", which has a chance
@@ -919,7 +919,7 @@ declare module uiGrid {
* At present all rows visible is running at 50, filter is running at 100, sort is at 200, grouping at 400,
* selectable rows at 500, pagination at 900 (pagination will generally want to be last)
*/
- registerRowsProcessor(rowProcessor: IRowProcessor, priority: number): void;
+ registerRowsProcessor(rowProcessor: IRowProcessor, priority: number): void;
/**
* Scroll the grid such that the specified
* row and column is in view
@@ -927,7 +927,7 @@ declare module uiGrid {
* @param {IColumnDef} colDef to make visible
* @returns {ng.IPromise} a promise that is resolved after any scrolling is finished
*/
- scrollTo(entity: any, colDef: IColumnDef): void; /*A row entity can be anything?*/
+ scrollTo(entity: any, colDef: IColumnDef): void; /*A row entity can be anything?*/
/**
* Scrolls the grid to make a certain row and column combo visible,
* in the case that it is not completely visible on the screen already.
@@ -935,7 +935,7 @@ declare module uiGrid {
* @param {IGridColumn} gridCol column to make visible
* @returns {ng.IPromise} a promise that is resolved when scrolling is complete
*/
- scrollToIfNecessary(gridRow: IGridRow, gridCol: IGridColumn): void;
+ scrollToIfNecessary(gridRow: IGridRow, gridCol: IGridColumn): void;
/**
* A null handling method that can be used when building custom sort
* functions
@@ -969,7 +969,7 @@ declare module uiGrid {
* @param {columnVisibilityChangedHandler} callBack Will be called when the event is emited.
* The function passes back the GridCol that has changed
*/
- columnVisibilityChanged: (scope: ng.IScope, callBack: columnVisibilityChangedHandler) => void;
+ columnVisibilityChanged: (scope: ng.IScope, callBack: columnVisibilityChangedHandler) => void;
/**
* is raised after the filter is changed.
* The nature of the watch expression doesn't allow notification of what changed,
@@ -977,13 +977,13 @@ declare module uiGrid {
* @param {ng.IScope} scope Grid scope
* @param {filterChangedHandler} handler Callback
*/
- filterChanged: (scope: ng.IScope, handler: filterChangedHandler) => void;
+ filterChanged: (scope: ng.IScope, handler: filterChangedHandler) => void;
/**
* is raised after the cache of visible rows is changed
* @param {ng.IScope} scope Grid scope
* @param {rowsRenderedHandler} handler callback
*/
- rowsRendered: (scope: ng.IScope, handler: rowsRenderedHandler) => void;
+ rowsRendered: (scope: ng.IScope, handler: rowsRenderedHandler) => void;
/**
* is raised after the rows that are visible change.
* The filtering is zero-based, so it isn't possible to say which rows changed
@@ -993,7 +993,7 @@ declare module uiGrid {
* @param {ng.IScope} scope Grid scope
* @param {rowsVisibleChangedHandler} handler callback
*/
- rowsVisibleChanged: (scope: ng.IScope, handler: rowsVisibleChangedHandler) => void;
+ rowsVisibleChanged: (scope: ng.IScope, handler: rowsVisibleChangedHandler) => void;
/**
* is raised when scroll begins. Is throttled, so won't be raised too frequently
* @param {ng.IScope} scope Grid scope
@@ -1008,12 +1008,12 @@ declare module uiGrid {
scrollEnd: (scope: ng.IScope, handler: scrollEndHandler) => void;
}
}
- export interface columnVisibilityChangedHandler {
+ export interface columnVisibilityChangedHandler {
/**
* Column visibility changed event handler
* @param {IGridColumn} column Ui Grid column
*/
- (column: IGridColumn): void;
+ (column: IGridColumn): void;
}
export interface canvasHeightChangedHandler {
/**
@@ -1024,28 +1024,28 @@ declare module uiGrid {
(oldHeight: number, newHeight: number): void;
}
- export interface filterChangedHandler{
+ export interface filterChangedHandler {
/**
* Filter changed event callback
* @param {IGridApi} gridApi grid api
*/
- (gridApi: IGridApi): void;
+ (gridApi: IGridApi): void;
}
- export interface rowsRenderedHandler {
+ export interface rowsRenderedHandler {
/**
* Rows rendered event callback
* @param {IGridApi} gridApi Grid api object
*/
- (gridApi: IGridApi): void;
+ (gridApi: IGridApi): void;
}
- export interface rowsVisibleChangedHandler {
+ export interface rowsVisibleChangedHandler {
/**
* Rows visible changed event callback
* @param {IGridApi} gridApi grid api object
*/
- (gridApi: IGridApi): void;
+ (gridApi: IGridApi): void;
}
export interface scrollBeginHandler {
@@ -1102,24 +1102,24 @@ declare module uiGrid {
allowCellFocus?: boolean;
}
- export interface ICellNavApi {
+ export interface ICellNavApi {
// Methods
/**
* Gets the currently selected rows and columns. array is empty if no selection has occurred
* @returns {Array} an array containing the current selection
*/
- getCurrentSelection(): Array;
+ getCurrentSelection(): Array>;
/**
* Gets the current focused cell. value is null if no selection has occurred
* @returns {IRowCol} the current (or last if Grid does not have focus) focused row and column
*/
- getFocusedCell(): IRowCol;
+ getFocusedCell(): IRowCol;
/**
* Gets the index of the passed rowCol. Returns -1 if the RowCol isn't selected
* @param rowCol
* @returns the index in the order in which the RowCol was selected
*/
- rowColSelectIndex(rowCol: IRowCol): number;
+ rowColSelectIndex(rowCol: IRowCol): number;
/**
* 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
@@ -1134,7 +1134,7 @@ declare module uiGrid {
* @param {ng.IScope} scope The grid scope
* @param {navigateHandler} handler Callback
*/
- navigate: (scope: ng.IScope, handler: navigateHandler) => void;
+ navigate: (scope: ng.IScope, handler: navigateHandler) => void;
/**
* viewportKeyDown is raised when the viewPort receives a keyDown event.
* Cells never get focus in uiGrid due to the difficulties of setting focus on a cell that is
@@ -1142,7 +1142,7 @@ declare module uiGrid {
* @param {ng.IScope} scope The grid scope
* @param {viewportKeyDownHandler} handler Callback
*/
- viewportKeyDown: (scope: ng.IScope, handler: viewportKeyDownHandler) => void;
+ viewportKeyDown: (scope: ng.IScope, handler: viewportKeyDownHandler) => void;
/**
* viewportKeyPress is raised when the viewPort receives a keyPress event.
* Cells never get focus in uiGrid due to the difficulties of setting focus on a cell that is
@@ -1150,47 +1150,47 @@ declare module uiGrid {
* @param {ng.IScope} scope The grid scope
* @param {viewportKeyPressHandler} handler Callback
*/
- viewportKeyPress: (scope: ng.IScope, handler: viewportKeyPressHandler) => void;
+ viewportKeyPress: (scope: ng.IScope, handler: viewportKeyPressHandler) => void;
}
}
- export interface navigateHandler {
+ export interface navigateHandler {
/**
* Callback for navigate event
* @param {IRowCol} newRowCol New position
* @param {IRowCol} oldRowCol Old position
*/
- (newRowCol: IRowCol, oldRowCol: IRowCol): void;
+ (newRowCol: IRowCol, oldRowCol: IRowCol): void;
}
- export interface viewportKeyDownHandler {
+ export interface viewportKeyDownHandler {
/**
* Callback for viewport key down event
* @param {JQueryKeyEventObject} event Keydown event
* @param {IRowCol} rowCol Current row Col position
*/
- (event: JQueryKeyEventObject, rowCol: IRowCol): void;
+ (event: JQueryKeyEventObject, rowCol: IRowCol): void;
}
- export interface viewportKeyPressHandler {
+ export interface viewportKeyPressHandler {
/**
* Callback for viewport key press event
* @param {JQueryKeyEventObject} event Keypress event
* @param {IRowCol} rowCol Current row Col position
*/
- (event: JQueryKeyEventObject, rowCol: IRowCol): void;
+ (event: JQueryKeyEventObject, rowCol: IRowCol): void;
}
- export interface IRowColConstructor {
- new (row: uiGrid.IGridRow, col: IGridColumn): IRowCol;
+ export interface IRowColConstructor {
+ new (row: uiGrid.IGridRow, col: IGridColumn): IRowCol;
}
/**
* A row and column pair that represents the intersection of these two entities
*/
- export interface IRowCol {
- row: uiGrid.IGridRow;
- col: IGridColumn;
+ export interface IRowCol {
+ row: uiGrid.IGridRow;
+ col: IGridColumn;
/**
* Gets the intersection of where the row and column meet
* @returns The value from the grid data that this RowCol points to. If the column has a cellFilter this
@@ -1230,7 +1230,7 @@ declare module uiGrid {
/**
* Edit related Column Definition
*/
- export interface IColumnDef {
+ export interface IColumnDef {
/**
* If specified, either a value or function evaluated before editing cell.
* If falsy, then editing of cell is not allowed.
@@ -1282,7 +1282,7 @@ declare module uiGrid {
reader.readAsText( files[0] );
}
*/
- editFileChooserCallback?: (gridRow: uiGrid.IGridRow, gridCol: IGridColumn, files: FileList) => void;
+ editFileChooserCallback?: (gridRow: uiGrid.IGridRow, gridCol: IGridColumn, files: FileList) => void;
/**
* A bindable string value that is used when binding to edit controls instead of colDef.field
* For example if you have a complex property on an object like:
@@ -1356,29 +1356,29 @@ declare module uiGrid {
/**
* Public Api for edit feature
*/
- export interface IGridEditApi {
+ export interface IGridEditApi {
on: {
/**
* raised when cell editing is complete
* @param scope The grid scope
* @param {afterCellEditHandler} handler Callback
*/
- afterCellEdit: (scope: ng.IScope, handler: afterCellEditHandler) => void;
+ afterCellEdit: (scope: ng.IScope, handler: afterCellEditHandler) => void;
/**
* raised when cell editing starts on a cell
* @param scope The grid scope
* @param {beginCellEditHandler} handler Callback
*/
- beginCellEdit: (scope: ng.IScope, handler: beginCellEditHandler) => void;
+ beginCellEdit: (scope: ng.IScope, handler: beginCellEditHandler) => void;
/**
* raised when cell editing is cancelled on a cell
* @param scope The grid scope
* @param {cancelCellEditHandler} handler Callback
*/
- cancelCellEdit: (scope: ng.IScope, handler: cancelCellEditHandler) => void;
+ cancelCellEdit: (scope: ng.IScope, handler: cancelCellEditHandler) => void;
}
}
- export interface afterCellEditHandler{
+ export interface afterCellEditHandler {
/**
* raised when cell editing is complete
* @param {any} rowEntity the options.data element that was edited
@@ -1386,7 +1386,7 @@ declare module uiGrid {
* @param {any} newValue New Value
* @param {any} oldValue Old Value
*/
- (rowEntity: any, colDef: IColumnDef, newValue: any, oldValue: any): void;
+ (rowEntity: any, colDef: IColumnDef, newValue: any, oldValue: any): void;
}
/**
@@ -1396,8 +1396,8 @@ declare module uiGrid {
* @param {JQueryEventObject} triggerEvent the event that triggered the edit. Useful to prevent losing
* keystrokes on some complex editors
*/
- export interface beginCellEditHandler{
- (rowEntity: any, colDef: IColumnDef, triggerEvent: JQueryEventObject): void;
+ export interface beginCellEditHandler {
+ (rowEntity: any, colDef: IColumnDef, triggerEvent: JQueryEventObject): void;
}
/**
@@ -1405,8 +1405,8 @@ declare module uiGrid {
* @param {any} rowEntity the options.data element that was edited
* @param {IColumnDef} colDef The column that was edited
*/
- export interface cancelCellEditHandler{
- (rowEntity: any, colDef: IColumnDef): void;
+ export interface cancelCellEditHandler {
+ (rowEntity: any, colDef: IColumnDef): void;
}
/**
@@ -1458,7 +1458,7 @@ declare module uiGrid {
/**
* Public Api for expandable feature
*/
- export interface IGridExpandableApi {
+ export interface IGridExpandableApi {
// Methods
/**
* Collapse all subgrids.
@@ -1485,16 +1485,16 @@ declare module uiGrid {
* @param {ng.IScope} scope
* @param {rowExpandedStateChangedHandler} handler
*/
- rowExpandedStateChanged: (scope: ng.IScope, handler: rowExpandedStateChangedHandler) => void;
+ rowExpandedStateChanged: (scope: ng.IScope, handler: rowExpandedStateChangedHandler) => void;
}
}
- export interface rowExpandedStateChangedHandler {
+ export interface rowExpandedStateChangedHandler {
/**
* Raised when cell editing is complete
* @param {IGridRow} row The row that was expanded
*/
- (row: IGridRow): void;
+ (row: IGridRow): void;
}
}
@@ -1517,7 +1517,7 @@ declare module uiGrid {
/**
* GridOptions for exporter feature, these are available to be set using the ui-grid gridOptions
*/
- export interface IGridOptions {
+ export interface IGridOptions {
/**
* This promise is needed when exporting all rows, and the data need to be provided by server side.
* Default is null
@@ -1558,7 +1558,7 @@ declare module uiGrid {
* @param {any} value The cell value
* @returns {any} Formatted value
*/
- exporterFieldCallback?: (grid: IGridInstance, row: uiGrid.IGridRow, col: IGridColumn, value: any) => any;
+ exporterFieldCallback?: (grid: IGridInstance, row: uiGrid.IGridRow, col: IGridColumn, value: any) => any;
/**
* A function to apply to the header displayNames before exporting. Useful for internationalisation,
* for example if you were using angular-translate you'd set this to $translate.instant.
@@ -1827,7 +1827,7 @@ declare module uiGrid {
/**
* Public Api for grouping feature
*/
- export interface IGridGroupingApi {
+ export interface IGridGroupingApi {
// Methods
/**
* Sets the aggregation type on a column.
@@ -1884,13 +1884,13 @@ declare module uiGrid {
* @param {ng.IScope} scope Grid Scope
* @param {aggregationChangedHandler} handler Callback method
*/
- aggregationChanged: (scope: ng.IScope, handler: aggregationChangedHandler) => void;
+ aggregationChanged: (scope: ng.IScope, handler: aggregationChangedHandler) => void;
/**
* raised whenever the grouped columns change
* @param {ng.IScope} scope Grid Scope
* @param {groupingChangedHandler} handler Callback method
*/
- groupingChanged: (scope: ng.IScope, handler: groupingChangedHandler) => void;
+ groupingChanged: (scope: ng.IScope, handler: groupingChangedHandler) => void;
};
}
/**
@@ -1929,22 +1929,22 @@ declare module uiGrid {
export interface IGridExpandedHash {
[key: string]: IGridExpandedHash | string;
}
- export interface aggregationChangedHandler {
+ export interface aggregationChangedHandler {
/**
* raised whenever aggregation is changed, added or removed from a column
* @param {IGridColumn} col the column which on which aggregation changed.
* The aggregation type is available as col.treeAggregation.type
*/
- (col: IGridColumn): void;
+ (col: IGridColumn): void;
}
- export interface groupingChangedHandler {
+ export interface groupingChangedHandler {
/**
* raised whenever the grouped columns changes
* @param {IGridColumn} col the column which on which grouping changed.
* The new grouping is available as col.grouping
*/
- (col: IGridColumn): void;
+ (col: IGridColumn): void;
}
/**
@@ -1961,7 +1961,7 @@ declare module uiGrid {
/**
* GridOptions for importer feature, these are available to be set using the ui-grid gridOptions
*/
- export interface IGridOptions {
+ export interface IGridOptions {
/**
* A mandatory callback function that adds data to the source data array.
* The grid generally doesn't add rows to the source data array,
@@ -1969,7 +1969,7 @@ declare module uiGrid {
* @param {IGridInstance} grid The grid we're importing into, may be useful in some way
* @param {Array} newObjects An array of new objects that you should add to your data
*/
- importerDataAddCallback?: (grid: IGridInstance, newObjects: Array) => void;
+ importerDataAddCallback?: (grid: IGridInstance, newObjects: Array) => void;
/**
* A callback function that provides custom error handling,
* rather than the standard grid behaviour of an alert box and a console message.
@@ -1986,7 +1986,7 @@ declare module uiGrid {
* @param {any} context the context data that importer would have appended to that console message,
* often the file content itself or the element that is in error
*/
- importerErrorCallback?: (grid: IGridInstance, errorKey: string, consoleMessage: string,
+ importerErrorCallback?: (grid: IGridInstance, errorKey: string, consoleMessage: string,
context: any) => void;
/**
* A callback function that will filter (usually translate) a single header.
@@ -2006,7 +2006,7 @@ declare module uiGrid {
* @returns {any} The modified object
* @default angular.identity
*/
- importerObjectCallback?: (grid: IGridInstance, newObject: any) => any;
+ importerObjectCallback?: (grid: IGridInstance, newObject: any) => any;
/**
* A callback function that will process headers using custom
* logic. Set this callback function if the headers that your user will provide in their
@@ -2025,7 +2025,7 @@ declare module uiGrid {
* which you need to match to column.names
* @returns {Array} array of matching column names, in the same order as the headerArray
*/
- importerProcessHeaders?: (grid: IGridInstance, headerArray: Array) => Array;
+ importerProcessHeaders?: (grid: IGridInstance, headerArray: Array) => Array;
/**
* Whether or not importer is enabled. Automatically set
* to false if the user's browser does not support the required fileApi.
@@ -2088,7 +2088,7 @@ declare module uiGrid {
/**
* Public API for infinite scroll feature
*/
- export interface IGridInfiniteScrollApi {
+ export interface IGridInfiniteScrollApi {
// Methods
/**
* Call this function when you have loaded the additional data requested.
@@ -2128,7 +2128,7 @@ declare module uiGrid {
* @param {boolean} scrollDown flag that there are pages downwards, so fire infinite scroll events downward
* @returns {ng.IPromise} A promise that is resolved when scrolling finishes
*/
- dataRemovedBottom(grid: IGridInstance, scrollUp: boolean, scrollDown: boolean): ng.IPromise;
+ dataRemovedBottom(grid: IGridInstance, scrollUp: boolean, scrollDown: boolean): ng.IPromise;
/**
* Adjusts the scroll position after you've removed data at the bottom
* @param {boolean} scrollUp flag that there are pages upwards, fire infinite scroll events upward
@@ -2147,7 +2147,7 @@ declare module uiGrid {
* @param {boolean} scrollDown flag that there are pages downwards, so fire infinite scroll events downward
* @returns {ng.IPromise} A promise that is resolved when scrolling finishes
*/
- dataRemovedTop(grid: IGridInstance, scrollUp: boolean, scrollDown: boolean): ng.IPromise;
+ dataRemovedTop(grid: IGridInstance, scrollUp: boolean, scrollDown: boolean): ng.IPromise;
/**
* Call this function when you have taken some action that makes the current scroll position invalid.
* For example, if you're using external sorting and you've resorted then you might reset the scroll,
@@ -2356,14 +2356,14 @@ declare module uiGrid {
enablePinning?: boolean;
}
- export interface IGridPinningApi {
+ export interface IGridPinningApi {
// Methods
/**
* Pin column left, right, or none
* @param {IGridColumn} col The column being pinned
* @param {string} container One of the recognized container types from uiGridPinningConstants
*/
- pinColumn(col: IGridColumn, container: string): void;
+ pinColumn(col: IGridColumn, container: string): void;
// Events
/**
@@ -2456,7 +2456,7 @@ declare module uiGrid {
rowEditWaitInterval?: number;
}
- export interface IGridRowEditApi {
+ export interface IGridRowEditApi {
// Methods
/**
* Triggers a save event for all currently dirty rows.
@@ -2465,19 +2465,19 @@ declare module uiGrid {
* @returns {ng.IPromise>} a promise that represents the aggregate of all of the individual save
* promises. i.e. it will be resolved when all the individual save promises have been resolved.
*/
- flushDirtyRows(grid?: IGridInstance): ng.IPromise>;
+ flushDirtyRows(grid?: IGridInstance): ng.IPromise>;
/**
* Returns all currently dirty rows
* @param {IGridInstance} grid The target grid
* @returns {Array} An array of gridRows that are currently dirty
*/
- getDirtyRows(grid?: IGridInstance): Array;
+ getDirtyRows(grid?: IGridInstance): Array>;
/**
* Returns all currently errored rows
* @param {IGridInstance} grid The target grid
* @returns {Array} An array of gridRows that are currently in error
*/
- getErrorRows(grid?: IGridInstance): Array;
+ getErrorRows(grid?: IGridInstance): Array>;
/**
* Sets each of the rows passed in dataRows to be clean,
* removing them from the dirty cache and the error cache,
@@ -2804,7 +2804,7 @@ declare module uiGrid {
/**
* Public Api for selection feature
*/
- export interface IGridSelectionApi {
+ export interface IGridSelectionApi {
// Methods
/**
* Unselects All Rows
@@ -2841,10 +2841,10 @@ declare module uiGrid {
selectAllVisibleRows(event?: ng.IAngularEvent): void;
/**
* Select row by data
- * @param {any} rowEntity gridOptions.data[] array value
+ * @param {TEntity} rowEntity gridOptions.data[] array value
* @param {ng.IAngularEvent} event object if raised from event
*/
- selectRow(rowEntity: any, event?: ng.IAngularEvent): void;
+ selectRow(rowEntity: TEntity, event?: ng.IAngularEvent): void;
/**
* Select the specified row by visible index
* (i.e. if you specify row 0 you'll get the first visible row selected).
@@ -2868,16 +2868,16 @@ declare module uiGrid {
setMultiSelect(multiSelect: boolean): void;
/**
* Toggles data row as selected or unselected
- * @param {any} rowEntity gridOptions.data[] array value
+ * @param {TEntity} rowEntity gridOptions.data[] array value
* @param {ng.IAngularEvent} event object if raised from event
*/
- toggleRowSelection(rowEntity: any, event?: ng.IAngularEvent): void;
+ toggleRowSelection(rowEntity: TEntity, event?: ng.IAngularEvent): void;
/**
* UnSelect the data row
- * @param {any} rowEntity gridOptions.data[] array value
+ * @param {TEntity} rowEntity gridOptions.data[] array value
* @param {ng.IAngularEvent} event object if raised from event
*/
- unSelectRow(rowEntity: any, event?: ng.IAngularEvent): void;
+ unSelectRow(rowEntity: TEntity, event?: ng.IAngularEvent): void;
// Events
on: {
@@ -2886,7 +2886,7 @@ declare module uiGrid {
* @param {ng.IScope} scope grid scope
* @param {rowSelectionChangedHandler} handler callback
*/
- rowSelectionChanged: (scope: ng.IScope, handler: rowSelectionChangedHandler) => void;
+ rowSelectionChanged: (scope: ng.IScope, handler: rowSelectionChangedHandler) => void;
/**
* is raised after the row.isSelected state is changed in bulk,
* if the enableSelectionBatchEvent option is set to true (which it is by default).
@@ -2894,25 +2894,25 @@ declare module uiGrid {
* @param {ng.IScope} scope grid scope
* @param {rowSelectionChangedBatchHandler} handler callback
*/
- rowSelectionChangedBatch: (scope: ng.IScope, handler: rowSelectionChangedBatchHandler) => void;
+ rowSelectionChangedBatch: (scope: ng.IScope, handler: rowSelectionChangedBatchHandler) => void;
}
}
- export interface rowSelectionChangedHandler {
+ export interface rowSelectionChangedHandler {
/**
* Callback for row selection changed
* @param {IGridRow} row The selected rows
* @param {ng.IAngularEvent} event object if raised from event
*/
- (row: uiGrid.IGridRow, event?: ng.IAngularEvent): void;
+ (row: uiGrid.IGridRow, event?: ng.IAngularEvent): void;
}
- export interface rowSelectionChangedBatchHandler {
+ export interface rowSelectionChangedBatchHandler {
/**
* Callback for row selection changed batch
* @param {IGridRow} row The selected rows
* @param {ng.IAngularEvent} event object if raised from event
*/
- (row: Array, event?: ng.IAngularEvent): void;
+ (row: Array>, event?: ng.IAngularEvent): void;
}
}
@@ -2920,7 +2920,7 @@ declare module uiGrid {
/**
* ColumnDef for tree feature, these are available to be set using the ui-grid gridOptions.columnDefs
*/
- export interface IColumnDef {
+ export interface IColumnDef {
/**
* A custom function that populates aggregation.rendered.
* This is called when a particular aggregation has been fully calculated, and we want to render the value.
@@ -2947,7 +2947,7 @@ declare module uiGrid {
* @param {IGridRow} row Row objet
*/
customerTreeAggregationFn?: (aggregation: IGridTreeBaseAggregationObject, fieldValue: any, numValue: number,
- row: IGridRow) => void;
+ row: IGridRow) => void;
/**
* A custom label to use for this aggregation. If providedm, we don't use native i18n
*/
@@ -2993,7 +2993,7 @@ declare module uiGrid {
/**
* Tree Base Grid Options
*/
- export interface IGridOptions {
+ export interface IGridOptions {
/**
* If set to true, show the expand/collapse button even if there are no children of a node.
* You'd use this if you're planning to dynamically load the children
@@ -3022,7 +3022,7 @@ declare module uiGrid {
* Defaults to {}
* @default {}
*/
- treeCustomAggregations?: { [index: string]: IGridTreeBaseCustomAggregation; };
+ treeCustomAggregations?: { [index: string]: IGridTreeBaseCustomAggregation; };
/**
* Number of pixels of indent for the icon at each tree level, wider indents are visually more pleasing,
* but will make the tree row header wider
@@ -3045,10 +3045,10 @@ declare module uiGrid {
treeRowHeaderBaseWidth?: number;
}
- export interface IGridTreeBaseCustomAggregation {
+ export interface IGridTreeBaseCustomAggregation {
label: string;
aggregationFn: (aggregation: IGridTreeBaseAggregationObject, fieldValue: any, numValue: number,
- row?: IGridRow) => void;
+ row?: IGridRow) => void;
finalizerFn?: (aggregation: IGridTreeBaseAggregationObject) => void;
}
export interface IGridTreeBaseAggregationObject {
@@ -3058,7 +3058,7 @@ declare module uiGrid {
rendered?: string;
}
- export interface IGridTreeBaseApi {
+ export interface IGridTreeBaseApi {
// Methods
/**
* Collapse all tree rows
@@ -3068,13 +3068,13 @@ declare module uiGrid {
* collapse the specified row. When you expand the row again, all grandchildren will retain their state
* @param {IGridRow} row The row to collapse
*/
- collapseRow(row: IGridRow): void;
+ collapseRow(row: IGridRow): void;
/**
* collapse all children of the specified row. When you expand the row again, all grandchildren will be
* collapsed
* @param {IGridRow} row The row to collapse children of
*/
- collapseRowChildren(row: IGridRow): void;
+ collapseRowChildren(row: IGridRow): void;
/**
* Expands all tree rows
*/
@@ -3083,13 +3083,13 @@ declare module uiGrid {
* Expand the immediate children of the specified row
* @param {IGridRow} row The row to expand
*/
- expandRow(row: IGridRow): void;
+ expandRow(row: IGridRow): void;
/**
* Get the children of the specified row
* @param {IGridRow} row The row you want the children of
* @returns Array Array of children rows
*/
- getRowChildren(row: IGridRow): Array;
+ getRowChildren(row: IGridRow): Array>;
/**
* Get the tree state for this grid, used by the saveState feature Returned treeState as an object
* ```{ expandedState: { uid: 'expanded', uid: 'collapsed' } }```
@@ -3107,7 +3107,7 @@ declare module uiGrid {
* call expand if row is collapsed, and collapse if it is expanded
* @param {IGridRow} row The row to toggle
*/
- toggleRowTreeState(row: IGridRow): void;
+ toggleRowTreeState(row: IGridRow): void;
// Events
on: {
@@ -3116,7 +3116,7 @@ declare module uiGrid {
* @param {ng.IScope} scope Grid scope
* @param {rowCollapsedHandler} handler Callback
*/
- rowCollapsed: (scope: ng.IScope, handler: rowCollapsedHandler) => void;
+ rowCollapsed: (scope: ng.IScope, handler: rowCollapsedHandler) => void;
/**
* Raised whenever a row is expanded.
*
@@ -3127,7 +3127,7 @@ declare module uiGrid {
* @param {ng.IScope} scope Grid Scope
* @param {rowExpandedHandler} handler Callback
*/
- rowExpanded: (scope: ng.IScope, handler: rowExpandedHandler) => void;
+ rowExpanded: (scope: ng.IScope, handler: rowExpandedHandler) => void;
}
}
@@ -3137,20 +3137,20 @@ declare module uiGrid {
}
}
- export interface rowCollapsedHandler {
+ export interface rowCollapsedHandler {
/**
* Row Collapsed callback
* @param {IGridRow} row The row that was collapsed. You can also retrieve the grid from this row with row.grid
*/
- (row: IGridRow): void;
+ (row: IGridRow): void;
}
- export interface rowExpandedHandler {
+ export interface rowExpandedHandler {
/**
* Row Expanded callback
* @param {IGridRow} row The row that was expanded. You can also retrieve the grid from this row with row.grid
*/
- (row: IGridRow): void;
+ (row: IGridRow): void;
}
/**
@@ -3200,10 +3200,10 @@ declare module uiGrid {
// Tree View
- export interface IGridApiConstructor {
- new (grid: IGridInstance): IGridApi;
+ export interface IGridApiConstructor {
+ new (grid: IGridInstance): IGridApi;
}
- export interface IGridApi {
+ export interface IGridApi {
/**
* Registers a new event for the given feature. The event will get a .raise and .on prepended to it
*
@@ -3256,12 +3256,12 @@ declare module uiGrid {
/**
* Core Api
*/
- core: IGridCoreApi;
+ core: IGridCoreApi;
/**
* Cell Nav Api
*/
- cellNav: cellNav.ICellNavApi;
+ cellNav: cellNav.ICellNavApi;
/**
* Move Columns Api
@@ -3276,12 +3276,12 @@ declare module uiGrid {
/**
* Edit Api
*/
- edit: edit.IGridEditApi;
+ edit: edit.IGridEditApi;
/**
* Expandable Api
*/
- expandable: expandable.IGridExpandableApi;
+ expandable: expandable.IGridExpandableApi;
/**
* Exporter Api
@@ -3291,7 +3291,7 @@ declare module uiGrid {
/**
* Grouping Api
*/
- grouping: grouping.IGridGroupingApi;
+ grouping: grouping.IGridGroupingApi;
/**
* Importer Api
@@ -3301,7 +3301,7 @@ declare module uiGrid {
/**
* Infinite Scroll Api
*/
- infiniteScroll: infiniteScroll.IGridInfiniteScrollApi;
+ infiniteScroll: infiniteScroll.IGridInfiniteScrollApi;
/**
* Pagination Api
@@ -3311,12 +3311,12 @@ declare module uiGrid {
/**
* Pinning Api
*/
- pinning: pinning.IGridPinningApi;
+ pinning: pinning.IGridPinningApi;
/**
* Grid Row Edit Api
*/
- rowEdit: rowEdit.IGridRowEditApi;
+ rowEdit: rowEdit.IGridRowEditApi;
/**
* Grid Save State Api
@@ -3325,19 +3325,19 @@ declare module uiGrid {
/**
* Selection Api
*/
- selection: selection.IGridSelectionApi;
+ selection: selection.IGridSelectionApi;
/**
* Tree Base Api
*/
- treeBase: treeBase.IGridTreeBaseApi;
+ treeBase: treeBase.IGridTreeBaseApi;
/**
* A grid instance is made available in the gridApi.
*/
- grid: IGridInstance;
+ grid: IGridInstance;
}
- export interface IGridRowConstructor {
+ export interface IGridRowConstructor {
/**
* GridRow is the viewModel for one logical row on the grid.
* A grid Row is not necessarily a one-to-one relation to gridOptions.data.
@@ -3345,13 +3345,13 @@ declare module uiGrid {
* @param index the current position of the row in the array
* @param reference to the parent grid
*/
- new(entity: any, index: number, reference: IGridInstance): IGridRow;
+ new(entity: TEntity, index: number, reference: IGridInstance): IGridRow;
}
- export interface IGridRow extends cellNav.IGridRow, edit.IGridRow, exporter.IGridRow, selection.IGridRow {
+ export interface IGridRow extends cellNav.IGridRow, edit.IGridRow, exporter.IGridRow, selection.IGridRow {
/** A reference to an item in gridOptions.data[] */
- entity: any;
+ entity: TEntity;
/** A reference back to the grid */
- grid: IGridInstance;
+ grid: IGridInstance;
/**
* height of each individual row. changing the height will flag all
* row renderContainers to recalculate their canvas height
@@ -3379,7 +3379,7 @@ declare module uiGrid {
* Changed to just call the internal function row.clearThisRowInvisible().
* @param row the row we want to clear the invisible flag
*/
- clearRowInvisible(row: IGridRow): void;
+ clearRowInvisible(row: IGridRow