import { default as React } from 'react'; /** * Props for the useAutoTableHeight hook */ interface UseAutoTableHeightProps { /** Ref to the outer DataTable wrapper element */ outerRef: React.RefObject; /** Ref to the table container (ScrollArea wrapper) — used to identify siblings */ tableContainerRef: React.RefObject; /** Whether auto-height mode is active */ enabled: boolean; /** Minimum height fallback when parent has no bounded height */ minHeight?: number; } /** * Measures available vertical space for the DataTable container using ResizeObserver. * * When `tableHeight="auto"`, the table should fill the available vertical space * in its parent container (like AG Grid's normal mode with a flex parent). * This hook observes the outer wrapper, calculates sibling heights (title, action bar), * and returns an explicit pixel height for the ScrollArea — ensuring virtualization * always works correctly. * * **Important:** The parent container MUST provide a bounded height (explicit height, * max-height, or flex layout with constrained parent). Without it, falls back to * `window.innerHeight * 0.7` clamped to `minHeight` and emits a dev warning. * * @returns The computed pixel height for the table container, or `undefined` when disabled */ declare const useAutoTableHeight: ({ outerRef, tableContainerRef, enabled, minHeight, }: UseAutoTableHeightProps) => number | undefined; export default useAutoTableHeight;