defineFlexGrid
Returns a Solid component that renders a grid configured through FlexGridRuntimeProps
import { defineFlexGrid } from "@roku-sdk/flex-grid";defineFlexGrid<T>(defaults?: Partial<FlexGridConfig<T>>): Component<FlexGridRuntimeProps<T>>Description
Returns a Solid component that renders a grid configured through FlexGridRuntimeProps.
Pass defaults for props shared by every instance; runtime JSX props override via mergeProps.
Parameters
| Name | Type | Description |
|---|---|---|
defaults? | Partial<FlexGridConfig<T>> |
Return values
Returns Component<FlexGridRuntimeProps<T>>.
Types
FlexGridRuntimeProps
Everything createFlexGrid accepts, plus row data and an optional handle callback.
- Structural props (layout, strategies, plugins, callbacks, …) are read into a remount
dependency list; when that list changes, the grid is recreated (same contract as calling
createFlexGridagain). rowsis excluded from remount deps: when onlyrowschanges, the existing handle
receivesFlexGridHandle.updateRows.jumpTois also excluded from remount deps: when onlyjumpTochanges (plain tuple
orAccessor), the existing grid animates/snaps via the internal jump effect.allowJumpOnEmptyis reactive likejumpTo— toggling it does not remount the grid.
type FlexGridRuntimeProps<T> = FlexGridConfig<T> & { gridHandleRef: (handle: FlexGridHandle<T> | null) => void; rows: Accessor<T[] | undefined[]> | T[] | undefined[]; rowsStartIndex: number };Updated about 3 hours ago
What’s Next
Did this page help you?