IScrollStrategyData
interface
Scroll
Runtime data bag passed to every TScrollStrategyFn. Gives the strategy access to the overlay root element, content element, positioning target, active state flag and the update-location callback to recompute floating position.
TypeScript
Définition
La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.
API
Propriétés
Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.
- rootrequisRef<HTMLElement | undefined>
- The overlay root element whose scroll listeners are managed by the strategy.
- contentElrequisRef<HTMLElement | undefined>
- The floating content element (tooltip bubble, menu panel, …).
- targetElrequisRef<HTMLElement | undefined>
- The anchor / activator element that the floating panel is positioned relative to.
- isActiverequisRef<boolean>
- Reactive flag controlling overlay visibility. Strategies may set this to false to close the overlay on scroll.
- updateLocationrequisRef<((e: Event) => void) | undefined>
- Callback provided by the positioning engine. The strategy calls it on scroll events to recompute the floating panel position.
Écosystème
Utilisé par
Composants et composables qui étendent ou consomment cette interface.
Usage
Exemples
Extraits de code prêts à coller utilisant cette interface.
Writing a custom TScrollStrategyFn