From 2c72e42103223ef1010233d366bd658afa089f67 Mon Sep 17 00:00:00 2001 From: Wenxuan Zhao Date: Fri, 11 Nov 2022 08:43:43 +0800 Subject: [PATCH] [GridAutoSizer] Fix onResize property type conflict --- package.json | 2 +- .../grid/x-data-grid/src/components/GridAutoSizer.tsx | 3 ++- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 4e0196e62e21..3c19b9b25eb1 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "@types/mocha": "^10.0.0", "@types/node": "^18.11.9", "@types/prettier": "^2.7.1", - "@types/react": "^18.0.24", + "@types/react": "^18.0.25", "@types/react-dom": "^18.0.8", "@types/requestidlecallback": "^0.3.5", "@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 1955042a67f6..85338b31c343 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 eb6e64990482..2f3b4eafb88b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3501,10 +3501,10 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^18.0.24": - version "18.0.24" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.24.tgz#2f79ed5b27f08d05107aab45c17919754cc44c20" - integrity sha512-wRJWT6ouziGUy+9uX0aW4YOJxAY0bG6/AOk5AW5QSvZqI7dk6VBIbXvcVgIw/W5Jrl24f77df98GEKTJGOLx7Q== +"@types/react@*", "@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" "*"