mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #6830 from joeskeen/ui-grid
ui-grid - Added missing row.isExpanded value for uiGrid.expandable
This commit is contained in:
@@ -130,3 +130,14 @@ anotherGridInstance.scrollTo(rowEntityToScrollTo, columnDefToScrollTo);
|
||||
|
||||
var selectedRowEntities: Array<IMyEntity> = gridApi.selection.getSelectedRows();
|
||||
var selectedGridRows: Array<uiGrid.IGridRow> = gridApi.selection.getSelectedGridRows();
|
||||
|
||||
gridApi.expandable.on.rowExpandedStateChanged(null, (row) => {
|
||||
if (row.isExpanded) {
|
||||
console.log('expanded', row.entity);
|
||||
} else {
|
||||
gridApi.expandable.toggleRowExpansion(row.entity);
|
||||
}
|
||||
});
|
||||
gridApi.expandable.expandAllRows();
|
||||
gridApi.expandable.collapseAllRows();
|
||||
gridApi.expandable.toggleAllRows();
|
||||
|
||||
Vendored
+13
-1
@@ -1558,6 +1558,18 @@ declare module uiGrid {
|
||||
*/
|
||||
(row: IGridRowOf<TEntity>): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* GridRow settings for expandable
|
||||
*/
|
||||
export interface IGridRow {
|
||||
/**
|
||||
* If set to true, the row is expanded and the expanded view is visible
|
||||
* Defaults to false
|
||||
* @default false
|
||||
*/
|
||||
isExpanded?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export module exporter {
|
||||
@@ -3418,7 +3430,7 @@ declare module uiGrid {
|
||||
}
|
||||
export type IGridRow = IGridRowOf<any>;
|
||||
export interface IGridRowOf<TEntity> extends cellNav.IGridRow, edit.IGridRow, exporter.IGridRow,
|
||||
selection.IGridRow {
|
||||
selection.IGridRow, expandable.IGridRow {
|
||||
/** A reference to an item in gridOptions.data[] */
|
||||
entity: TEntity;
|
||||
/** A reference back to the grid */
|
||||
|
||||
Reference in New Issue
Block a user