Api
FinderCore wraps Finder's internal methods to simplify the API surface.
Constructor
new FinderCore<FItem, FContext>(items: FItem[] | null | undefined, options: FinderConstructorOptions);
Properties
| Name | Type | Description |
|---|---|---|
| search | object | See Search API |
| filters | object | See Filter API |
| sortBy | object | See SortBy API |
| groupBy | object | See GroupBy API |
| pagination | object | See Pagination API |
| matches | object | See Matches API |
| events | object | See Events API |
| context | FContext | A reference to an external context object. |
| disabled | boolean | If set true, this instance will ignore any rule state changes. |
| hasMatches | boolean | If the current combination of search and filters have found any matches. |
| isReady | boolean | Evaluates as true once isLoading is false, and the items object is a valid array. |
| isEmpty | boolean | Evaluates as true once isLoading is false, and the items object is a valid array, but has length zero. |
| isLoading | boolean | Set to true once a valid dataset has been received. |
| items | FItem[] | The dataset being operated on. |
| state | 'loading' | 'empty' | 'groups' | 'items' | 'noMatches' | Only a single state can be active at a time. |
| updatedAt | number | In 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