isGridSmoothScrolling

Reads whether a grid is currently performing a held smooth scroll

Available since @roku-sdk/flex-grid 3.3.0

import {
    isGridSmoothScrolling,
} from "@roku-sdk/flex-grid/smooth-scroll-bridge";
isGridSmoothScrolling(gridKey: object | undefined): boolean

Description

Reads whether a grid is currently performing a held smooth scroll.

Read inside a reactive scope to update when the hold starts or settles. Missing keys and grids without the bridge plugin return false.

Parameters

NameTypeDescription
gridKeyobject | undefinedThe grid identity supplied in cell render props, or undefined.

Return values

True during a held horizontal or vertical smooth scroll.

Example

const holding = () => isGridSmoothScrolling(props.gridKey);

What’s Next

Did this page help you?