Skip to content

@jsvision/ui / ComboBoxOptions

Interface: ComboBoxOptions<T> ​

Defined in: ui/src/dropdown/combo-box.ts:35

Options for a ComboBox.

Type Parameters ​

T ​

T

Properties ​

command? ​

optional command?: string

Defined in: ui/src/dropdown/combo-box.ts:51

Typed command emitted on pick (via the list's activation).


editable? ​

optional editable?: boolean

Defined in: ui/src/dropdown/combo-box.ts:45

Editable free-text + filter (default true); false = read-only picker + type-ahead.


filter? ​

optional filter?: (item, text) => boolean

Defined in: ui/src/dropdown/combo-box.ts:47

Candidate predicate for editable mode (default case-insensitive substring).

Parameters ​

item ​

T

text ​

string

Returns ​

boolean


getText ​

getText: (item) => string

Defined in: ui/src/dropdown/combo-box.ts:39

Render an item to its display string (list rows + the editable value ⟷ text match).

Parameters ​

item ​

T

Returns ​

string


items ​

items: Signal<T[]>

Defined in: ui/src/dropdown/combo-box.ts:37

The source items (reactive — the open popup re-renders on change in select-only mode).


maxRows? ​

optional maxRows?: number

Defined in: ui/src/dropdown/combo-box.ts:53

Max visible popup rows (default 6).


onSelect? ​

optional onSelect?: (index, item) => void

Defined in: ui/src/dropdown/combo-box.ts:49

App callback on pick, with the list's display index + the item.

Parameters ​

index ​

number

item ​

T

Returns ​

void


placeholder? ​

optional placeholder?: string | Signal<string>

Defined in: ui/src/dropdown/combo-box.ts:55

A muted hint shown in the field while it is empty (editable mode); forwarded to the inner field.


text? ​

optional text?: Signal<string>

Defined in: ui/src/dropdown/combo-box.ts:43

The field text (two-way). Defaults to an internal signal seeded '' (or getText(value)).


value ​

value: Signal<T | null>

Defined in: ui/src/dropdown/combo-box.ts:41

The selected value (two-way; null = none / no match).