EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: mshaffer on December 09, 2016, 05:51:50 PM



Title: Combobox, capture "Create New"
Post by: mshaffer on December 09, 2016, 05:51:50 PM
I am creating a combobox from a text input using external data... If the autocomplete is false, but the user typed something, I want to use that information to create a new (in this case) project, append to the beginning of the data...

Code:
var createNewProject = "";

within the constructor, onchange, I capture if the value hasn't changed... empty is a custom function ...

Code:
onChange: function (newValue, oldValue) {
if(!empty(newValue))
{
createNewProject = newValue;
}
}

I have tried the several handlers and haven't figured out HOW to trigger this new value to update the select, nor is it obvious how to add a single new value...