Home > widget-integration > PositionService > setupScrollHandler

PositionService.setupScrollHandler() method

Set up scroll handler to adjust z-index when scrolling.

**Legacy**: Inline scroll handler with debounce in calcPositionSuggestionResult **New**: Dedicated method with proper cleanup

Signature:

setupScrollHandler(container: HTMLElement): () => void;

Parameters

Parameter

Type

Description

container

HTMLElement

The dropdown container element

Returns:

() => void

Cleanup function to remove scroll handler