Mixins / foldkit-mixins-ui

SelectView

interface · packages/mixins-ui/src/select/view.ts:25

interface SelectView<Outer> {
  readonly id: string
  readonly label: string
  readonly options: ReadonlyArray<SelectOption>
  readonly value?: string | undefined
  readonly onChange?: ((value: string) => NoInfer<Outer>) | undefined
  readonly placeholder?: string | undefined
  readonly description?: string | undefined
  readonly disabled?: boolean | undefined
  readonly invalid?: boolean | undefined
  readonly name?: string | undefined
  readonly style?: NamedStyle<typeof SelectSlots> | undefined
  readonly mixins?: MixinList<Outer> | undefined
}

Members

SelectView.id

property · packages/mixins-ui/src/select/view.ts:27

readonly id: string

Prefixes the ids the select draws, unique on the page.

SelectView.label

property · packages/mixins-ui/src/select/view.ts:29

readonly label: string

The select's accessible name, drawn above it.

SelectView.options

property · packages/mixins-ui/src/select/view.ts:30

readonly options: ReadonlyArray<SelectOption>

SelectView.value

property · packages/mixins-ui/src/select/view.ts:32

readonly value?: string | undefined

The chosen option's value: the application's. With none given, the browser's first option is chosen.

SelectView.onChange

property · packages/mixins-ui/src/select/view.ts:34

readonly onChange?: ((value: string) => NoInfer<Outer>) | undefined

Sent with the value a choice leaves. Without it the select is the browser's own.

SelectView.placeholder

property · packages/mixins-ui/src/select/view.ts:36

readonly placeholder?: string | undefined

An empty first option that names what to choose, and cannot be chosen again.

SelectView.description

property · packages/mixins-ui/src/select/view.ts:38

readonly description?: string | undefined

A line under the select, which describes it.

SelectView.disabled

property · packages/mixins-ui/src/select/view.ts:39

readonly disabled?: boolean | undefined

SelectView.invalid

property · packages/mixins-ui/src/select/view.ts:40

readonly invalid?: boolean | undefined

SelectView.name

property · packages/mixins-ui/src/select/view.ts:42

readonly name?: string | undefined

Submitted under this name as the chosen value.

SelectView.style

property · packages/mixins-ui/src/select/view.ts:43

readonly style?: NamedStyle<typeof SelectSlots> | undefined

SelectView.mixins

property · packages/mixins-ui/src/select/view.ts:44

readonly mixins?: MixinList<Outer> | undefined