ListBoxComponent
Represents the Kendo UI ListBox component for Angular. Provides a list of items from which you can select and transfer data between connected ListBoxes (see overview).
Definition
Package:@progress/kendo-angular-listbox
Selector:kendo-listbox
Syntax:
@Component({
selector: 'my-app',
template: `
<kendo-listbox
[data]="items"
textField="name"
[toolbar]="true">
</kendo-listbox>
`
})
export class AppComponent {
items = [
{ name: 'Item 1' },
{ name: 'Item 2' }
];
}
Inputs
data
any[]
Specifies the data that the ListBox displays.
[]
Specifies a function that determines if a specific item is disabled.
boolean
defaultItemDisabled
listboxLabel
string
Specifies the value of the aria-label attribute of the Listbox element.
'Listbox'
listboxToolbarLabel
string
Specifies the value of the aria-label attribute of the Listbox toolbar element.
'Toolbar'
Sets the selection mode of the ListBox.
'single'
Specifies the size of the component.
textField
string
Specifies the field of the data item that provides the text content of the nodes.
toolbar
boolean | ListBoxToolbarConfig
Configures the toolbar of the ListBox. Specifies whether to display a toolbar and which tools and position to use.
false
Fields
selectedIndices
number[]
Gets the indexes of the currently selected items in the ListBox.
Events
Fires when you click a ListBox item.
Fires when you select a different ListBox item. Also fires when you move a node, because moving changes its index.
Methods
Clears the ListBox selection programmatically.
Selects multiple ListBox nodes programmatically.