Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { enrichEventWithDetails } from '@ui5/webcomponents-react-base';
import { enrichEventWithDetails, useIsomorphicLayoutEffect } from '@ui5/webcomponents-react-base';
import { clsx } from 'clsx';
import type { MutableRefObject } from 'react';
import { useCallback, useEffect, useRef, useState } from 'react';
Expand Down Expand Up @@ -46,9 +46,9 @@ export const VirtualTableBodyContainer = (props: VirtualTableBodyContainerProps)
} = props;
const [isMounted, setIsMounted] = useState(false);

useEffect(() => {
useIsomorphicLayoutEffect(() => {
if (parentRef.current) {
// Trigger one-time re-render after first render -> safe to set state here
// Run before paint so rows appear with the body container (avoids empty-body flash).
// eslint-disable-next-line react-hooks/set-state-in-effect
setIsMounted(true);
}
Expand Down
Loading