defines data items of the drop-down list
webix.ui({
view:"richselect",
value:1, // the initially selected one
label: 'Fruit',
options:[
{ "id":1, "value":"Banana"},
{ "id":2, "value":"Papaya"},
{ "id":3, "value":"Apple"}
]
});
webix.ui({
view:"richselect",
options:["Banana", "Papaya", "Apple"]
});
webix.ui({
view:"richselect",
options:"server/options.php"
});
The options of a dropdown list can be set as:
The initially selected option is defined by a value property.
Usually, if we define select options as array or data source a suggest list of a default type will be attached. It will feature default template, size and filtering (for editable inputs). If you need to customize these things, you should use the extended configuration:
{ view:"richselect", options:{
view:"suggest", // optional
filter:function(item, value){ ...},
body:{ // list configuration
view:"list", // optional
data:[..data..],
template:"#value#",
yCount:7
}
}}
Note, that the options property is analogous to the suggest property, you can use any one of them.