PanelFilter beta
Interface of @v12-engine/editor
export interface PanelFilterWhat a panel searches its own list by (panel.filter()): the words typed, read as a function (it follows in Solid) or get(), set from code, and the field itself, as a component (Field) or an element (element()), which Ctrl+F or / puts the keyboard in while the panel has it. find(items, keys) is the matching, the best first and a typo's nearest last (the kit's fuzzyBy); filterBy(items, filter(), textOf) where the list's order is to be kept; Highlight marks the letters found in a row
Members
(call)
(): string;The words typed now, read as a function so that Solid follows it
clear
clear(): void;Empties the words typed
element
element(): HTMLElement;The field, as an element to put where the panel likes: made once, the same each time
Field
Field: () => JSX.Element;The field, drawn by a component: <filter.Field />
find
find<T>(items: readonly T[], keys: SearchOptions<T>['keys'], options?: {
threshold?: number;
limit?: number;
}): SearchHit<T>[];The items the words typed find, the best first, with the letters that matched (the kit's fuzzyBy, over keys: property names, or keys with weights): every item, as it came, with nothing typed. A typo finds, unless the filter was made with fuzzy: false
get
get(): string;The words typed now
set
set(query: string): void;Sets the words typed