fix: nested scrolls on /bookings (#19284)

This commit is contained in:
Eunjae Lee authored and GitHub committed 2025-02-17 10:25:42 +01:00
1 parent e441f3308f
commit 14bba343a4
2 files changed
+46 -2

No files matched your search

@@ -28,6 +28,7 @@ export type DataTableWrapperProps<TData, TValue> = {
className?: string;
containerClassName?: string;
children?: React.ReactNode;
tableContainerRef?: React.RefObject<HTMLDivElement>;
};
export function DataTableWrapper<TData, TValue>({
@@ -46,8 +47,10 @@ export function DataTableWrapper<TData, TValue>({
className,
containerClassName,
children,
tableContainerRef: externalRef,
}: DataTableWrapperProps<TData, TValue>) {
const tableContainerRef = useRef<HTMLDivElement>(null);
const internalRef = useRef<HTMLDivElement>(null);
const tableContainerRef = externalRef || internalRef;
const fetchMoreOnBottomReached = useFetchMoreOnBottomReached({
tableContainerRef,
hasNextPage,