composeHorizontalStrategy
Compose a base horizontal strategy with zero or more row-specific extensions
import {
composeHorizontalStrategy,
} from "@roku-sdk/flex-grid/compose-h-strategy";composeHorizontalStrategy<TConfig extends FocusStrategyBase>(base: FocusStrategyPlugin<TConfig>, extensions: HStrategyExtension<TConfig>[], options?: { name: string }): FocusStrategyPlugin<TConfig>Description
Compose a base horizontal strategy with zero or more row-specific extensions. Extensions are tried in array order; the first match wins per hook.
Parameters
| Name | Type | Description |
|---|---|---|
base | FocusStrategyPlugin<TConfig> | Strategy used when no extension overrides a hook. |
extensions | HStrategyExtension<TConfig>[] | Overrides in priority order. |
options? | { name: string } | Optional name for the composed strategy. |
Return values
A strategy applying the first matching override for each hook.
Example
import { composeHorizontalStrategy, createPinnedFocusXExtension, matchRow } from "@roku-sdk/flex-grid/compose-h-strategy";
composeHorizontalStrategy(base, [createPinnedFocusXExtension(matchRow(0), 100)]);Updated about 7 hours ago
What’s Next
Did this page help you?