Skip to content

Latest commit

 

History

History
97 lines (66 loc) · 2.02 KB

list-picker.md

File metadata and controls

97 lines (66 loc) · 2.02 KB
title description contributors
ListPicker
UI component for selecting a value from a list.
rigor789
Ombuweb

<ListPicker> is a UI component that lets the user select a value from a pre-configured list.

::: code-group <<< @/../examples/typescript/src/ui/ListPicker/template.xml#example [XML] <<< @/../examples/typescript/src/ui/ListPicker/template.ts#example [TypeScript] :::

::: code-group <<< @/../examples/angular/src/ui/ListPicker/component.html#example [HTML] <<< @/../examples/angular/src/ui/ListPicker/component.ts#example [TypeScript] :::

<<< @/../examples/react/src/components/ui/listpicker.tsx#example

<<< @/../examples/solid/src/ui/listpicker.tsx#example

<<< @/../examples/svelte/app/components/ui/ListPicker.svelte#example

<<< @/../examples/vue/src/ui/ListPicker/component.vue#example

Props

items

items: Array<string | number>

Gets or sets the items of the ListPicker.

selectedIndex

selectedIndex: number

Gets or sets the index of the currently selected item.

...Inherited

For additional inherited properties, refer to the API Reference.

Events

selectedIndexChange

on('selectedIndexChange', (args: PropertyChangeData) => {
  const picker = args.object as ListPicker
  console.log('selectedIndex changed to', args.value)
  // or picker.selectedIndex
})

Emitted when the currently selected item (index) changes.

Native component