/** * Pixel height of the paginator bar, matching the value used in the Table * styled component SUITableContainer. Exported so callers can share the constant * rather than duplicate it. */ export declare const PAGINATOR_CONTAINER_HEIGHT = 38; /** * Pixel spacing between the table body and the paginator bar. */ export declare const PAGINATOR_SPACING = 5; interface UseDynamicHeightParams { /** Whether the dynamic-height feature is currently enabled. */ dynamicHeight?: boolean; /** * Framework-supplied callback that receives the viz's total natural height * in pixels. Pass `undefined` to clear a previously reported override * (e.g. when dynamic height is disabled). */ onRequestHeight?: (height: number | undefined) => void; /** Whether the paginator is currently active (adds chrome to the measurement). */ isPaging: boolean; /** * Opaque change signal — re-measuring is triggered whenever this value * changes identity (use `tableBody.rows`). */ rows: unknown; /** * Opaque change signal — re-measuring is triggered whenever this value * changes identity (use the `expandedRowJson` memo from the component). */ expandedRowJson: unknown; } interface UseDynamicHeightResult { /** Attach to the outermost container element (`VizTableContainer`). */ containerRef: React.RefObject; /** Attach to the scroll-viewport container (`SUITableContainer`). */ containerRefInner: React.RefObject; /** * Attach to the SUI Table element via its `elementRef` prop. * The hook reaches the inner `` node through this ref. */ suiTableRef: React.RefObject; } /** * Manages dynamic-height reporting for the Table visualization. * * Responsibilities: * - Measures the table's natural content height (inner `
` scrollHeight + * container padding + optional paginator chrome) and reports it via * `onRequestHeight` whenever content changes size. * - Dedupes: only fires `onRequestHeight` when the computed height changes. * - Caches the last measured height so that toggling `dynamicHeight` back on * can immediately re-report without waiting for a new ResizeObserver entry. * - Clears the layout override (reports `undefined`) when `dynamicHeight` flips * false, but keeps the cache so re-enabling restores the grown height. * * The hook owns and returns the three refs that must be attached to DOM nodes * by the calling component. * * **Future seam:** the `onRequestHeight` prop will eventually be replaced by * `useDynamicHeightCallback(id)` from `@splunk/dashboard-context` once that hook * is available. The internal caching and enable/disable logic already mirrors the * framework's `useDynamicHeightReporter` shape to make that swap straightforward. */ export declare const useDynamicHeight: ({ dynamicHeight, onRequestHeight, isPaging, rows, expandedRowJson, }: UseDynamicHeightParams) => UseDynamicHeightResult; export {}; //# sourceMappingURL=useDynamicHeight.d.ts.map