setNumRows
Grow or shrink the store's row count
Available since @roku-sdk/flex-grid 3.3.0
import { setNumRows } from "@roku-sdk/flex-grid";setNumRows<T>(store: GridStore<T>, newNumRows: number): voidDeprecated.
Use FlexGridHandle to update grid data. Will be removed from the public exports in the next major version.
Description
Grow or shrink the store's row count. New rows added during growth are initialised to undefined.
Invariant: setNumRows always produces a full relayout (dataOnlyRelayout=false) in the engine. It sets forceFullRelayout so the data-only short-circuit cannot apply even when dirty rows exist and the row window / focus / scroll scalars happen to match. Cleared by the engine after the full pass. This means lastMatchedFocusedVm is always cleared after a setNumRows call — no guard for stale focused-VM references is needed here.
Parameters
| Name | Type | Description |
|---|---|---|
store | GridStore<T> | |
newNumRows | number |
Updated about 3 hours ago
What’s Next
Did this page help you?