Interface: AutoheightState<S>

The state returned by useAutoheight hook.

Type parameters

NameTypeDescription
SWebshellProps<MinimalWebViewProps, [ExtractFeatureFromClass<typeof HandleHTMLDimensionsFeature>]>The type of the Webshell props used by this hook.

Hierarchy

  • AutoheightState

Properties

autoheightWebshellProps

• autoheightWebshellProps: Pick<S, "webshellDebug" | "onDOMHTMLDimensions" | "style" | "scalesPageToFit" | "showsVerticalScrollIndicator" | "disableScrollViewPanResponder" | "contentMode"> & Partial<S>

The props to inject into webshell in order to support "autoheight" behavior.


contentSize

• contentSize: Partial<DOMRectSize>

An object describing the content size. When the size is not yet known, this object fields will be undefined.


resizeImplementation

• resizeImplementation: HTMLDimensionsImplementation | null

The implementation used to generate resize events.


syncState

• syncState: AutoheightSyncState

The state of synchronization between viewport and content size:

  • 'init': the initial, "onMount" state;
  • 'syncing': the content size is being determined;
  • 'synced': the viewport size has been adjusted to content size.