gridScrollMs

Reads the grid's current per-step scroll duration in milliseconds

Available since @roku-sdk/flex-grid 3.3.0

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

Description

Reads the grid's current per-step scroll duration in milliseconds.

Read inside a reactive scope to track duration changes. Missing keys and grids without the bridge plugin return zero.

Parameters

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

Return values

The scroll duration in milliseconds, or zero for an unregistered grid.

Example

const duration = () => gridScrollMs(props.gridKey);

Did this page help you?