@types/react-data-grid
Advanced tools
Comparing version 4.0.4 to 4.0.5
@@ -66,2 +66,10 @@ // Type definitions for react-data-grid 4.0 | ||
/** | ||
* Invoked when the user clicks on one cell to expand it. | ||
* @param e Information about the event | ||
*/ | ||
onCellExpand?: (e:CellExpandEvent<T>) => void | ||
getSubRowDetails?: (row: T) => SubRowDetails | ||
/** | ||
* Invoked when the user double clicks on the drag handle of an editable cell. | ||
@@ -461,2 +469,50 @@ * Should update the values of the cells beneath the selected cell. | ||
/** | ||
* Information about a cell expanded. | ||
*/ | ||
interface CellExpandEvent<T = any> { | ||
/** | ||
* The row index where the cell is being expanded. | ||
*/ | ||
rowIdx: number | ||
/** | ||
* The column index where the cell is being expanded. | ||
*/ | ||
idx: number | ||
/** | ||
* The values of the row. | ||
*/ | ||
rowData: T | ||
/** | ||
* Expand data. | ||
*/ | ||
expandArgs: any | ||
} | ||
/** | ||
* Information about subrows. | ||
*/ | ||
interface SubRowDetails<T = any> { | ||
/** | ||
* Determines if the cell can expand. | ||
*/ | ||
canExpand?: boolean; | ||
/** | ||
* Sets the field/column that will be use to expand the subrows. | ||
*/ | ||
field: string; | ||
/** | ||
* Determines if the row has already expanded. | ||
*/ | ||
expanded: boolean; | ||
/** | ||
* Children data. | ||
*/ | ||
children?: T[]; | ||
treeDepth?: number; | ||
siblingIndex?: number; | ||
numberSiblings?: number; | ||
group?: boolean; | ||
} | ||
/** | ||
* Information about a drag handle double click. Generic event type returns untyped row, use parameterized type with the row type as the parameter | ||
@@ -589,2 +645,3 @@ * @default T = any | ||
export import CellDragEvent = AdazzleReactDataGrid.CellDragEvent; | ||
export import CellExpandEvent = AdazzleReactDataGrid.CellExpandEvent; | ||
export import DragHandleDoubleClickEvent = AdazzleReactDataGrid.DragHandleDoubleClickEvent; | ||
@@ -591,0 +648,0 @@ export import CellCopyPasteEvent = AdazzleReactDataGrid.CellCopyPasteEvent; |
{ | ||
"name": "@types/react-data-grid", | ||
"version": "4.0.4", | ||
"version": "4.0.5", | ||
"description": "TypeScript definitions for react-data-grid", | ||
@@ -29,3 +29,3 @@ "license": "MIT", | ||
"main": "", | ||
"types": "index", | ||
"types": "index.d.ts", | ||
"repository": { | ||
@@ -40,4 +40,4 @@ "type": "git", | ||
}, | ||
"typesPublisherContentHash": "c90ef682bbf39c34a807e8d22907ab36a10b1e2b0ec5fea8e010da1e50db5e8c", | ||
"typesPublisherContentHash": "28a1a623db397e487ce26bc5b1be755569ba21a4d547f2b239e509d73334f749", | ||
"typeScriptVersion": "2.8" | ||
} |
@@ -8,10 +8,10 @@ # Installation | ||
# Details | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-data-grid | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-data-grid. | ||
Additional Details | ||
* Last updated: Tue, 24 Sep 2019 23:42:30 GMT | ||
* Dependencies: @types/react | ||
* Global values: AdazzleReactDataGrid, AdazzleReactDataGridPlugins | ||
### Additional Details | ||
* Last updated: Fri, 15 Nov 2019 23:01:02 GMT | ||
* Dependencies: [@types/react](https://npmjs.com/package/@types/react) | ||
* Global values: `AdazzleReactDataGrid`, `AdazzleReactDataGridPlugins` | ||
# Credits | ||
These definitions were written by Simon Gellis <https://github.com/SupernaviX>, Kieran Peat <https://github.com/KieranPeat>, Martin Novak <https://github.com/martinnov92>, and Sebastijan Grabar <https://github.com/baso53>. | ||
These definitions were written by Simon Gellis (https://github.com/SupernaviX), Kieran Peat (https://github.com/KieranPeat), Martin Novak (https://github.com/martinnov92), and Sebastijan Grabar (https://github.com/baso53). |
28775
741