closeScrollStrategy

Commons
stable

A scroll strategy that automatically closes an overlay (sets isActive to false) whenever a scroll event is detected on the target or content element. Used by OrigamMenu and similar floating components.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

data
requis
IScrollStrategyData
The scroll strategy data object provided by the overlay infrastructure, containing refs to the content element, target element, and the isActive toggle.

API

Valeur de retour

La valeur retournée par cet util.

Returns nothing. Registers a scroll listener that closes the overlay when triggered.

Usage

Exemples

Extraits de code prêts à coller.

Used via the scrollStrategy prop

html