From a34794bfa39e5f5cc67eb96dcecf3a3a2b10ec98 Mon Sep 17 00:00:00 2001 From: Viz Date: Tue, 15 Nov 2022 06:03:56 +0800 Subject: [PATCH] [DataGrid] Fix conflict with `onResize` added to `React.HTMLAttributes` (#6797) --- package.json | 2 +- .../grid/x-data-grid/src/components/GridAutoSizer.tsx | 3 ++- yarn.lock | 11 ++++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5e3fc506a2908..4297035ef839b 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "@types/mocha": "^9.1.1", "@types/node": "^18.7.15", "@types/prettier": "^2.7.0", - "@types/react": "^18.0.17", + "@types/react": "^18.0.25", "@types/react-dom": "^18.0.6", "@types/requestidlecallback": "^0.3.4", "@types/sinon": "^10.0.13", diff --git a/packages/grid/x-data-grid/src/components/GridAutoSizer.tsx b/packages/grid/x-data-grid/src/components/GridAutoSizer.tsx index 1955042a67f6d..85338b31c3435 100644 --- a/packages/grid/x-data-grid/src/components/GridAutoSizer.tsx +++ b/packages/grid/x-data-grid/src/components/GridAutoSizer.tsx @@ -17,7 +17,8 @@ export interface AutoSizerSize { // Credit to https://github.com/bvaughn/react-virtualized/blob/master/source/AutoSizer/AutoSizer.js // for the sources. -export interface AutoSizerProps extends Omit, 'children'> { +export interface AutoSizerProps + extends Omit, 'children' | 'onResize'> { /** * Function responsible for rendering children. * @param {AutoSizerSize} size The grid's size. diff --git a/yarn.lock b/yarn.lock index 77cb3516d8986..9f4ba56cb73d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3583,7 +3583,7 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^18.0.17": +"@types/react@*": version "18.0.17" resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.17.tgz#4583d9c322d67efe4b39a935d223edcc7050ccf4" integrity sha512-38ETy4tL+rn4uQQi7mB81G7V1g0u2ryquNmsVIOKUAEIDK+3CUjZ6rSRpdvS99dNBnkLFL83qfmtLacGOTIhwQ== @@ -3592,6 +3592,15 @@ "@types/scheduler" "*" csstype "^3.0.2" +"@types/react@^18.0.25": + version "18.0.25" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.25.tgz#8b1dcd7e56fe7315535a4af25435e0bb55c8ae44" + integrity sha512-xD6c0KDT4m7n9uD4ZHi02lzskaiqcBxf4zi+tXZY98a04wvc0hi/TcCPC2FOESZi51Nd7tlUeOJY8RofL799/g== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + "@types/requestidlecallback@^0.3.4": version "0.3.4" resolved "https://registry.yarnpkg.com/@types/requestidlecallback/-/requestidlecallback-0.3.4.tgz#819e22b8994cf547e1f17f9cb79805a5a3bb1db5"