0.0.5 • Published 8 months ago
@aria-ui/collection v0.0.5
@aria-ui/collection
Collection #
constructor
new Collection(items: Iterable<HTMLElement>, loop?: boolean): Collectionloop: boolean
first
Returns the first enabled value.
const first: () => null | string;getElement
Finds an element from its value.
const getElement: (value: string) => null | HTMLElement;getValues
Returns all values.
const getValues: () => string[];last
Returns the last enabled value.
const last: () => null | string;next
Returns the next enabled value.
const next: (value: null | string) => null | string;prev
Returns the previous enabled value.
const prev: (value: null | string) => null | string;size
const size: () => number;ItemFilter #
The filter function to determine if an item should be shown in the collection.
Type: (options: { query: string; value: string }) => boolean
defaultItemFilter #
A simple case-insensitive substring match filter.
function defaultItemFilter(options: { query: string; value: string }): boolean;