UI Components
ListPicker
UI component for selecting a value from a list.
<ListPicker>
is a UI component that lets the user select a value from a pre-configured list.
xml
<ListPickeritems="{{ items }}" />
ts
constitems= [`First`, `Second`, `Third`]
html
<ListPicker[items]="items" />
ts
items = [`First`, `Second`, `Third`];
tsx
<listPickeritems={items} />
tsx
<listpickeritems={choices}></listpicker>
svelte
<listPicker{items}></listPicker>
vue
<ListPicker :items="items" />
Props β
items β
ts
items: Array<string | number>
Gets or sets the items of the ListPicker.
selectedIndex β
ts
selectedIndex: number
Gets or sets the index of the currently selected item.
...Inherited β
For additional inherited properties, refer to the API Reference.
Events β
selectedIndexChange β
ts
on('selectedIndexChange', (args:PropertyChangeData) => {
constpicker= args.object asListPicker
console.log('selectedIndex changed to', args.value)
// or picker.selectedIndex
})
Emitted when the currently selected item (index) changes.
Native component β
- Android:
android.widget.NumberPicker
- iOS:
UIPickerView