Skip to content

1681-engine / react / useFillSheet

Function: useFillSheet() ​

ts
function useFillSheet(
   ref, 
   active, 
   fit
): void;

Defined in: src/react/useFillSheet.ts:12

Fills what is left of a touch sheet's scrolling body (.e1681-panel-body) below whatever sits above the element — tabs, a note — so a list-and-detail fits without the body scrolling; a stylesheet's 100vh - 120px guesses one layout and scrolls in every other. Measured after every render and on every resize; with fit it caps the height instead of setting it. Outside a panel body the stylesheet's height stands.

Parameters ​

ParameterType
refRefObject<HTMLElement | null>
activeboolean
fitboolean

Returns ​

void

Released under the MIT License.