mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 20:39:17 +08:00
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:
committed by
Masahiro Wakame
parent
6abf99dda1
commit
0c1189250f
@@ -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
|
||||
}
|
||||
|
||||
2
ui-grid/ui-grid.d.ts
vendored
2
ui-grid/ui-grid.d.ts
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user