From d54b4cf303143b459c3caae54d14ae926a8ee09a Mon Sep 17 00:00:00 2001 From: Ruslan Lesiutin Date: Thu, 22 Feb 2024 19:18:30 +0000 Subject: [PATCH] fix[devtools]: fixed Tree indentation logic after updating react-windows (#28421) Forward-fixing the indentation after landing https://github.com/facebook/react/pull/28408. Could potentially be related to `ref` changes in `react`, but haven't validated yet. Haven't occured while testing the previous PR, but reproduced while testing the https://github.com/facebook/react/pull/28418, for which I've rebuilt all dependencies, including `react`. This change basically removes the props passing from original parent, `rest` should include only `ref`: https://github.com/bvaughn/react-window/blob/efad3d8909753fd74aad7c47dc902b26f0919651/src/createListComponent.js#L382 --- .../src/devtools/views/Components/Tree.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/react-devtools-shared/src/devtools/views/Components/Tree.js b/packages/react-devtools-shared/src/devtools/views/Components/Tree.js index 8fd22f3ddf49f..7e15ba05142ac 100644 --- a/packages/react-devtools-shared/src/devtools/views/Components/Tree.js +++ b/packages/react-devtools-shared/src/devtools/views/Components/Tree.js @@ -538,7 +538,7 @@ function updateIndentationSizeVar( } // $FlowFixMe[missing-local-annot] -function InnerElementType({children, style, ...rest}) { +function InnerElementType({children, style}) { const {ownerID} = useContext(TreeStateContext); const cachedChildWidths = useMemo>( @@ -586,11 +586,7 @@ function InnerElementType({children, style, ...rest}) { // A lot of options were considered; this seemed the one that requires the least code. // See https://github.com/bvaughn/react-devtools-experimental/issues/9 return ( -
+
{children}