Merge pull request #5684 from baltie/ui-grid-selection-api

ui-grid: Fixed row getters in selection API.
This commit is contained in:
Masahiro Wakame
2015-09-16 22:14:05 +09:00
2 changed files with 11 additions and 3 deletions
+8
View File
@@ -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();
+3 -3
View File
@@ -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