Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ComboboxStyleProps<TData>

Type parameters

  • TData

Hierarchy

Index

Properties

Optional as

as: string | Element

Optional classNames

classNames: RootClassName & Record<keyof ComboboxStyles, string>

Class names for the root component and the subcomponents.

Optional component

component: RenderFunction<{ store: ComboboxStoreById<undefined> }>

Render this component when the combobox is open (useful to inject hooks).

Optional controlled

controlled: boolean

Is opening/closing the combobox controlled by the client.

Optional filter

filter: (search: string) => (item: TComboboxItem<TData>) => boolean

Items filter function by text.

default

(value) => value.text.toLowerCase().startsWith(search.toLowerCase())

Type declaration

Optional highlighted

highlighted: boolean

id

id: string

Combobox id.

Optional items

items: TComboboxItem<TData>[]

Unfiltered items.

Optional maxSuggestions

maxSuggestions: number

Max number of items.

default

items.length

Optional onRenderItem

onRenderItem: RenderFunction<ComboboxItemProps<TData>>

Render combobox item.

default

text

onSelectItem

onSelectItem: null | ComboboxOnSelectItem<TData>

Called when an item is selected.

Optional prefixClassNames

prefixClassNames: string

Optional searchPattern

searchPattern: string

Regular expression for search, for example to allow whitespace

Optional styles

styles: Partial<RootStyles> & Partial<ComboboxStyles>

Customized styling that will layer on top of the default rules.

trigger

trigger: string

Trigger that activates the combobox.

Generated using TypeDoc