returns the current value of the control
config | object | additional parameter (described below) |
string|array | the current value of the control |
webix.ui({
view:"multicombo",
id: "multi",
label:"To",
value:"1,3",
suggest: names // or e.g. suggest: "data/names.js"
});
$$("multi").getValue(); // "1,3"
The returned value of the control can be a string or an array depending on the stringResult property. By default, selected values are returned in the comma-separated format. You can define other delimiter using the separator property.
If you want to return a value as an array of options objects, specify the config parameter {options: true}
:
console.log($$("multi").getValue({options:true}));