From 23ef52703f86d6c8d2feef3027bafc0da5167d0f Mon Sep 17 00:00:00 2001 From: Armin Mehinovic Date: Tue, 3 Dec 2024 12:48:57 +0100 Subject: [PATCH] Align migration guide --- .../migration-data-grid-v7.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/docs/data/migration/migration-data-grid-v7/migration-data-grid-v7.md b/docs/data/migration/migration-data-grid-v7/migration-data-grid-v7.md index 80e20eb596b3f..453fabd1ddd66 100644 --- a/docs/data/migration/migration-data-grid-v7/migration-data-grid-v7.md +++ b/docs/data/migration/migration-data-grid-v7/migration-data-grid-v7.md @@ -46,16 +46,11 @@ Below are described the steps you need to make to migrate from v7 to v8. - The `` component is not exported anymore. - `gridRowsDataRowIdToIdLookupSelector` was removed. Use `gridRowsLookupSelector` in combination with `getRowId()` API method instead. - ```tsx - // Before - const idToIdLookup = gridRowsDataRowIdToIdLookupSelector(apiRef); - ... - const rowId = idToIdLookup[id] - - // After - const rowsLookup = gridRowsLookupSelector(apiRef); - ... - const rowId = apiRef.current.getRowId(rowsLookup[id]) + ```diff + -const idToIdLookup = gridRowsDataRowIdToIdLookupSelector(apiRef); + -const rowId = idToIdLookup[id] + +const rowsLookup = gridRowsLookupSelector(apiRef); + +const rowId = apiRef.current.getRowId(rowsLookup[id]); ``` ### Localization