Home > widget-integration > StickyController

StickyController class

Signature:

export declare class StickyController extends Controller 

Extends: Controller

Constructors

Constructor

Modifiers

Description

(constructor)(appService, filterStickyService, domHelper)

Constructs a new instance of the StickyController class

Properties

Property

Modifiers

Type

Description

stickyProps

readonly

IStickyProps

Current sticky feature flags and layout styles derived from filter settings.

Methods

Method

Modifiers

Description

backwardCompatibility(options, layoutType, layoutStyle)

Applies legacy sticky override config to the options passed into StickyService factories.

This currently maps elements.preDefineSelector into topOffsetSelectors, preserving older shop customizations that pin sticky filters below theme headers or announcement bars.

clearHorizontalFilterTreeWrapperStyles()

Clears inline styles left by horizontal filter drawers and notifies listeners to close drawers.

clearMobileFullscreenStyles(mobileWrapper)

Clears mobile fullscreen sticky styles from the active mobile filter wrapper.

createOption(layoutType, layoutStyle)

Builds sticky options for the active layout before a StickyService factory is selected.

Override this method to inject shop-specific offsets, selectors, dimensions, or style options without replacing the controller's desktop/mobile factory selection logic.

createOptíon(layoutType, layoutStyle)

destroy()

Cancels scheduled refreshes and removes the active sticky instance.

getConfigOverrides(layoutType, layoutStyle)

protected

Resolves sticky customization config for a concrete filter layout.

Technical Support can override this method when a shop stores sticky overrides outside window.boostWidgetIntegration.config.customization.filter.sticky or needs custom fallback rules between global and layout-specific settings.

init()

Initializes the sticky filter instance for the current viewport and filter layout.

refresh()

Recreates the sticky instance after filter DOM, layout settings, or viewport state changes.

scheduleRefresh()

Schedules one animation-frame refresh and delayed follow-up refreshes for async DOM updates.