how can I dynamic change items in “options”, now I can just use an empty “options”
webix.ui({
view: "property",
id: "mon_prop",
width: 300,
nameWidth: 100,
elements: [
{
label: "List", type: "richselect", id: "list_sel", options: [],
on: {
onChange: function (newv, oldv) {
console.log(newv);
}
}
},
],
});
var lst =["aa","bb"]
$$("mon_prop").getItem("list_sel").options = lst;
And how to get the event of the “richselect”, below shows “list_sel” has no attachEvent function
$$("mon_prop").getItem("list_sel").attachEvent("onChange", function (newv, oldv) {
console.log(newv);
});