@@ -62,6 +62,14 @@ declare namespace AdazzleReactDataGrid {
6262 * @param e Information about the event
6363 */
6464 onCellsDragged ?: ( e : CellDragEvent ) => void
65+ /**
66+ * Invoked when the user clicks on one cell to expand it.
67+ * @param e Information about the event
68+ */
69+ onCellExpand ?: ( e :CellExpandEvent < T > ) => void
70+
71+ getSubRowDetails ?: ( row : T ) => SubRowDetails
72+
6573 /**
6674 * Invoked when the user double clicks on the drag handle of an editable cell.
6775 * Should update the values of the cells beneath the selected cell.
@@ -456,6 +464,54 @@ declare namespace AdazzleReactDataGrid {
456464 value : any
457465 }
458466
467+ /**
468+ * Information about a cell expanded.
469+ */
470+ interface CellExpandEvent < T = any > {
471+ /**
472+ * The row index where the cell is being expanded.
473+ */
474+ rowIdx : number
475+ /**
476+ * The column index where the cell is being expanded.
477+ */
478+ idx : number
479+ /**
480+ * The values of the row.
481+ */
482+ rowData : T
483+ /**
484+ * Expand data.
485+ */
486+ expandArgs : any
487+ }
488+
489+ /**
490+ * Information about subrows.
491+ */
492+ interface SubRowDetails < T = any > {
493+ /**
494+ * Determines if the cell can expand.
495+ */
496+ canExpand ?: boolean ;
497+ /**
498+ * Sets the field/column that will be use to expand the subrows.
499+ */
500+ field : string ;
501+ /**
502+ * Determines if the row has already expanded.
503+ */
504+ expanded : boolean ;
505+ /**
506+ * Children data.
507+ */
508+ children ?: T [ ] ;
509+ treeDepth ?: number ;
510+ siblingIndex ?: number ;
511+ numberSiblings ?: number ;
512+ group ?: boolean ;
513+ }
514+
459515 /**
460516 * Information about a drag handle double click. Generic event type returns untyped row, use parameterized type with the row type as the parameter
461517 * @default T = any
@@ -584,6 +640,7 @@ declare namespace AdazzleReactDataGrid {
584640 export import RowUpdateEvent = AdazzleReactDataGrid . RowUpdateEvent ;
585641 export import SelectionParams = AdazzleReactDataGrid . SelectionParams ;
586642 export import CellDragEvent = AdazzleReactDataGrid . CellDragEvent ;
643+ export import CellExpandEvent = AdazzleReactDataGrid . CellExpandEvent ;
587644 export import DragHandleDoubleClickEvent = AdazzleReactDataGrid . DragHandleDoubleClickEvent ;
588645 export import CellCopyPasteEvent = AdazzleReactDataGrid . CellCopyPasteEvent ;
589646 export import GridRowsUpdatedEvent = AdazzleReactDataGrid . GridRowsUpdatedEvent ;
0 commit comments