Skip to content

Commit

Permalink
fix[devtools]: fixed Tree indentation logic after updating react-wind…
Browse files Browse the repository at this point in the history
…ows (#28421)

Forward-fixing the indentation after landing
#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 #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
  • Loading branch information
hoxyq authored Feb 22, 2024
1 parent d4cac3f commit d54b4cf
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<WeakMap<HTMLElement, number>>(
Expand Down Expand Up @@ -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 (
<div
className={styles.InnerElementType}
ref={divRef}
style={style}
{...rest}>
<div className={styles.InnerElementType} ref={divRef} style={style}>
<SelectedTreeHighlight />
{children}
</div>
Expand Down

0 comments on commit d54b4cf

Please sign in to comment.