matchRowWhen

Matches when a predicate on the row index returns true

import { matchRowWhen } from "@roku-sdk/flex-grid/compose-h-strategy";
matchRowWhen(predicate: (row: number) => boolean): HStrategyMatcher

Description

Matches when a predicate on the row index returns true.

Parameters

NameTypeDescription
predicate(row: number) => booleanA predicate receiving the zero-based data row index.

Return values

A matcher that delegates to the row predicate.

Example

import { matchRowWhen } from "@roku-sdk/flex-grid/compose-h-strategy";
const matches = matchRowWhen(row => row >= 2);

What’s Next

Did this page help you?