items([items])

Class: List.

Description:

Sets or gets items of the list.

Parameters:

Name Type Description

[items]

Array.<(object|string|number)>

Array of items as objects or strings

Returns:

If items are passed, returns an instance of this List, otherwise returns an Object Array of items.

Type: List | Array.<object>

Examples:

list.items([{value:1, text:"Label 1", ...}, [{value:2, text:"Label 2", ...}); // Sets items by an array of objects
list.items(["Label 1", "Label 2", ...]); // Sets items by an array of strings
list.items(["Label 1", {value:1, text:"Label 1", ...}, 45); // Sets items as an array of strings, objects and numbers