• Provides an action to save scrollTop of an element with a vertical scrollbar. This action should be used on the scrollable element and must include a writable store that holds the active store for the current scrollTop value. You may switch the stores externally and this action will set the scrollTop based on the newly set store. This is useful for instance providing a select box that controls the scrollable container.

    Parameters

    • element: HTMLElement

      The target scrollable HTML element.

    • store: MinimalWritable<number>

      A minimal writable store that stores the element scrollTop.

    Returns ActionReturn<MinimalWritable<number>>

    Lifecycle functions.