connectedLocationStrategy
Commons
stable
Positions a floating overlay relative to its activator by computing the preferred anchor and origin, then adjusting to avoid viewport overflow. Handles both fixed and scrolled activators.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- datarequisILocationStrategyData
- Runtime data provided by the overlay (target ref, content ref, root ref, scroll parent).
- propsrequisILocationStrategyProps
- Component props driving the strategy: location, origin, offset, strategy.
- contentStylesrequisRef<Record<string, string>>
- A reactive ref that the strategy mutates to update the overlay's position styles.
API
Valeur de retour
La valeur retournée par cet util.
- Returns nothing. Applies position styles reactively via the contentStyles ref and sets up resize/scroll watchers.
Usage
Exemples
Extraits de code prêts à coller.
Used via the locationStrategy prop