fix(ui-grid): fix isRowSelectable typing (#9594)

* per [the ui-grid
  documentation](http://ui-grid.info/docs/#/tutorial/210_selection),
  `isRowSelectable` is a function that returns a boolean, rather than a straight boolean property.
This commit is contained in:
Adam Gordon
2016-06-13 09:45:53 -06:00
committed by Masahiro Wakame
parent 6abf99dda1
commit 0c1189250f
2 changed files with 5 additions and 3 deletions

View File

@@ -111,7 +111,7 @@ gridApi.core.clearAllFilters(true);
gridApi.core.addToGridMenu(gridInstance, [menuItem]);
gridApi.core.getVisibleRows(gridInstance);
gridApi.core.handleWindowResize();
gridApi.core.queueGridRefresh()
gridApi.core.queueGridRefresh();
gridApi.core.queueRefresh();
gridApi.core.registerColumnsProcessor(colProcessor, 100);
@@ -122,7 +122,9 @@ var gridOptions: uiGrid.IGridOptionsOf<IMyEntity> = {
console.log(row.entity.name);
})
}
}
};
gridOptions.isRowSelectable = () => true;
interface IAnotherEntity {
anObject: string
}

View File

@@ -2825,7 +2825,7 @@ declare namespace uiGrid {
* Makes it possible to specify a method that evaluates for each row and sets its "enableSelection"
* property.
*/
isRowSelectable?: boolean;
isRowSelectable?: (row: IGridRow) => boolean;
/**
* Enable multiple row selection only when using the ctrlKey or shiftKey. Requires multiSelect to be true.
* Defaults to false