diff --git a/packages/components/src/spectrum/listView/ListViewWrapper.tsx b/packages/components/src/spectrum/listView/ListViewWrapper.tsx index fe4f30ac7a..fd8f7a31c0 100644 --- a/packages/components/src/spectrum/listView/ListViewWrapper.tsx +++ b/packages/components/src/spectrum/listView/ListViewWrapper.tsx @@ -4,7 +4,6 @@ import { } from '@adobe/react-spectrum'; import { extractSpectrumHTMLElement, - useContentRect, useOnScrollRef, } from '@deephaven/react-hooks'; import { EMPTY_FUNCTION } from '@deephaven/utils'; @@ -29,18 +28,10 @@ export function ListViewWrapper( const { scale } = useSpectrumThemeProvider(); - // Spectrum ListView crashes when it has zero height. Track the contentRect - // of the parent container and only render the ListView when it has a non-zero - // height. See https://github.com/adobe/react-spectrum/issues/6213 - const { ref: contentRectRef, contentRect } = useContentRect( - extractSpectrumHTMLElement - ); - const scrollRef = useOnScrollRef(onScroll, extractSpectrumHTMLElement); return ( ( styleProps.UNSAFE_className )} > - {contentRect.height === 0 ? ( - // Use   to ensure content has a non-zero height. This ensures the - // container will also have a non-zero height unless its height is - // explicitly set to zero. Example use case: - // 1. Tab containing ListView is visible. Container height is non-zero. - // ListView is rendered. - // 2. Tab is hidden. Container height is explicitly constrained to zero. - // ListView is not rendered. - // 3. Tab is shown again. Height constraint is removed. Resize observer - // fires and shows non-zero height due to the   (without this, - // the height would remain zero forever since ListView hasn't rendered yet) - // 4. ListView is rendered again. - <>  - ) : ( - - )} + ); }