Skip to main content

Api

FinderCore wraps Finder's internal methods to simplify the API surface.

Constructor

new FinderCore<FItem, FContext>(items: FItem[] | null | undefined, options: FinderConstructorOptions);

Properties

NameTypeDescription
searchobjectSee Search API
filtersobjectSee Filter API
sortByobjectSee SortBy API
groupByobjectSee GroupBy API
paginationobjectSee Pagination API
matchesobjectSee Matches API
eventsobjectSee Events API
contextFContextA reference to an external context object.
disabledbooleanIf set true, this instance will ignore any rule state changes.
hasMatchesbooleanIf the current combination of search and filters have found any matches.
isReadybooleanEvaluates as true once isLoading is false, and the items object is a valid array.
isEmptybooleanEvaluates as true once isLoading is false, and the items object is a valid array, but has length zero.
isLoadingbooleanSet to true once a valid dataset has been received.
itemsFItem[]The dataset being operated on.
state'loading' | 'empty' | 'groups' | 'items' | 'noMatches'Only a single state can be active at a time.
updatedAtnumberIn milliseconds.

Methods

getRule

getRule(id: RuleDefinition | string): RuleDefinition | undefined;

setItems

setItems(items: FItem[] | null | undefined): void

setIsLoading

setIsLoading(value?: boolean): void

setIsDisabled

setIsDisabled(value?: boolean): void

setRules

setRules(definitions: RuleDefinition<FItem>[]): void

setContext

setContext(context: FContext):void

test

test(mixins: SnapshotSerializedMixins, isAdditive = false): FItem[]

toJSON

toJSON(): JSON