Combo box which can add new values dynamically

Hi,

I have a combo. Here are my requirements:

  1. The combo dropdown is blank(empty) initially.
  2. User should be able to type in a value that is not included in the list and that should add the item to the list.

Is there any control that allows me to do so?

Currently, I’m using a ‘suggest’ with a ‘text’. But I’m not able to get the current list items in the suggest dropdown to add new value to that. How can I get that?

Please help me!!!
Thanks a lot…

My Code:

{ view:“text”, width:400, label: ‘State’, labelPosition:“top”,
stringResult:true, id: ‘stateCombo’, suggest: states,
value:name, on: {
onBlur: function() {
count++;
states.push({id: (states.length+1), value:count});
webix.message($$(this).getValue());
// var list = $$(“stateCombo”).getPopup().getList(); // breaking here
// list.clearAll();
// list.parse(states);
}
}}

Using suggest box and text editor is the best solution for your use-case.

Check the updated snippet
http://webix.com/snippet/6ff8d71d

you was on the right track, just instead of using .parse you can use .add to add the new option to the list.