Skip to content

Commit 05cd596

Browse files
hoxyqAndyPengc12
authored andcommitted
fix[devtools]: fixed Tree indentation logic after updating react-windows (facebook#28421)
Forward-fixing the indentation after landing facebook#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 facebook#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
1 parent 3174b21 commit 05cd596

File tree

1 file changed

+2
-6
lines changed
  • packages/react-devtools-shared/src/devtools/views/Components

1 file changed

+2
-6
lines changed

packages/react-devtools-shared/src/devtools/views/Components/Tree.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ function updateIndentationSizeVar(
538538
}
539539

540540
// $FlowFixMe[missing-local-annot]
541-
function InnerElementType({children, style, ...rest}) {
541+
function InnerElementType({children, style}) {
542542
const {ownerID} = useContext(TreeStateContext);
543543

544544
const cachedChildWidths = useMemo<WeakMap<HTMLElement, number>>(
@@ -586,11 +586,7 @@ function InnerElementType({children, style, ...rest}) {
586586
// A lot of options were considered; this seemed the one that requires the least code.
587587
// See https://github.com/bvaughn/react-devtools-experimental/issues/9
588588
return (
589-
<div
590-
className={styles.InnerElementType}
591-
ref={divRef}
592-
style={style}
593-
{...rest}>
589+
<div className={styles.InnerElementType} ref={divRef} style={style}>
594590
<SelectedTreeHighlight />
595591
{children}
596592
</div>

0 commit comments

Comments
 (0)