Suggest: add new item if not found?

Hi,

How can I add new data to a suggest if now found? I know onValueSuggest get the value if found,
how would I get the value if not found, like onChange?

snippet

webix.ui({
  view:"suggest", data:[
    "One", "Two", "Three"
  ], 
  filter:function(item, value){
    return (item.value.toString().toLowerCase().indexOf(value.toLowerCase()) != -1)
  },
  on: {
     onValueSuggest: function (obj) {
        webix.message(JSON.stringify(obj))
     },
     onChange: function (newdata, olddata) {
        webix.message(JSON.stringify(newdata))
     },    
  }
}).linkInput("a1");

-Tomas

I replaced combo with a text view and a little massaging and it works.

-Tomas

did you check newValues option for combo?

1 Like