in my example I’ve got a form that is bind with a list.
If I select from the combo “2001: a space odyssey” and then I click on “save” the list updates but with the id and not with the value of my combo. Is it possible to update the list with combo’s value?
You are right, there’s an issue. Webix components are bound on the base of their value, not visible text. But here’s a workaround defined via a complex richselect configuration:
{
view:"richselect", width:300, yCount:2,
label: 'Film Title', name:"title",
value:1, options:{
data:[
{ id:1, value:"2001: a space odyssey" },
{ id:2, value:"TestA"},
{ id:3, value:"TestB"}
],
on:{ //obj {id:1, value:"2001: a space odyssey"}
'onValueSuggest':function(obj){
//getting richselect object
var master = $$(this.config.master);
//blocking events for richselect
master.blockEvent();
//setting text value
master.setValue(obj.value);
master.unblockEvent();
}
}
}
}