@aria-ui/collection
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

@aria-ui/collection

Collection #

constructor

new Collection(items: Iterable<HTMLElement>, loop?: boolean): Collection

loop: 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;

Readme

Keywords

none

Package Sidebar

Install

npm i @aria-ui/collection

Weekly Downloads

2,792

Version

0.0.5

License

MIT

Unpacked Size

6.88 kB

Total Files

5

Last publish

Collaborators

  • ocavue