mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #5684 from baltie/ui-grid-selection-api
ui-grid: Fixed row getters in selection API.
This commit is contained in:
@@ -100,3 +100,11 @@ gridApi.core.queueGridRefresh()
|
||||
gridApi.core.queueRefresh();
|
||||
gridApi.core.registerColumnsProcessor(colProcessor, 100);
|
||||
|
||||
var rowEntityToScrollTo = {anObject: 'inGridOptionsData'};
|
||||
var columnDefToScrollTo: uiGrid.IColumnDef;
|
||||
gridInstance.scrollTo();
|
||||
gridInstance.scrollTo(rowEntityToScrollTo);
|
||||
gridInstance.scrollTo(rowEntityToScrollTo, columnDefToScrollTo);
|
||||
|
||||
var selectedRowEntities: Array<any> = gridApi.selection.getSelectedRows();
|
||||
var selectedGridRows: Array<uiGrid.IGridRow> = gridApi.selection.getSelectedGridRows();
|
||||
|
||||
Vendored
+3
-3
@@ -445,7 +445,7 @@ declare module uiGrid {
|
||||
* @param {IColumnDef} colDef to make visible
|
||||
* @returns {ng.IPromise<any>} a promise that is resolved after any scrolling is finished
|
||||
*/
|
||||
scrollTo(rowEntity: IGridRow, colDef: IColumnDef): ng.IPromise<any>;
|
||||
scrollTo(rowEntity?: any, colDef?: IColumnDef): ng.IPromise<any>;
|
||||
/**
|
||||
* 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.
|
||||
@@ -2823,12 +2823,12 @@ declare module uiGrid {
|
||||
* returns all selected rows as gridRows
|
||||
* @returns {Array<IGridRow>} The selected rows
|
||||
*/
|
||||
getSelectedGridRows(): Array<IGridRow>;
|
||||
getSelectedGridRows(): Array<uiGrid.IGridRow>;
|
||||
/**
|
||||
* Gets selected rows as entities
|
||||
* @returns {Array<any>} Selected row entities
|
||||
*/
|
||||
getSelectedRows(): Array<IGridRow>;
|
||||
getSelectedRows(): Array<any>;
|
||||
/**
|
||||
* Selects all rows. Does nothing if multiselect = false
|
||||
* @param {ng.IAngularEvent} event object if raised from event
|
||||
|
||||
Reference in New Issue
Block a user