Merge pull request #6830 from joeskeen/ui-grid

ui-grid - Added missing row.isExpanded value for uiGrid.expandable
This commit is contained in:
Masahiro Wakame
2015-11-20 00:39:21 +09:00
2 changed files with 24 additions and 1 deletions
+11
View File
@@ -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();
+13 -1
View File
@@ -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 */