diff --git a/packages/x-data-grid-pro/src/models/dataGridProProps.ts b/packages/x-data-grid-pro/src/models/dataGridProProps.ts index e7425e47b4ac..af712a2c846d 100644 --- a/packages/x-data-grid-pro/src/models/dataGridProProps.ts +++ b/packages/x-data-grid-pro/src/models/dataGridProProps.ts @@ -167,7 +167,7 @@ export interface DataGridProPropsWithoutDefaultValue string[]; + getTreeDataPath?: (row: R) => ReadonlyArray; /** * Callback fired when scrolling to the bottom of the grid viewport. * @param {GridRowScrollEndParams} params With all properties from [[GridRowScrollEndParams]]. diff --git a/packages/x-data-grid-pro/src/tests/treeData.DataGridPro.test.tsx b/packages/x-data-grid-pro/src/tests/treeData.DataGridPro.test.tsx index c6b60ed1fd4f..7a41f87c1d09 100644 --- a/packages/x-data-grid-pro/src/tests/treeData.DataGridPro.test.tsx +++ b/packages/x-data-grid-pro/src/tests/treeData.DataGridPro.test.tsx @@ -214,7 +214,7 @@ describe(' - Tree data', () => { ]); setProps({ getTreeDataPath: (row) => [...row.name.split('.').reverse()], - } as DataGridProProps); + } as Pick); expect(getColumnValues(1)).to.deep.equal([ 'A', 'A.A',