Is there any way to add a blank option to a filtered dhtmlx

I like the dhtmlx combo box.

One of the requests we’ve had is to include a blank option so that users can clear the current value by selecting it.

We are using the dhtmlx combo box with dynamic filtering so when a value is already populated the dropdown list only shows one value, the selected one. To clear the value the user has to manually clear it. Is it possible to include a blank selection value in the combo box even if a value is selected while dynamic filtering is enabled?


Greg Simmons

In case of dynamic filtering only data which match entered text will be shown in list of options, but you can modify code in next way

for(var i=0; i<this.optionsArr.length; i++){
           var z=filter.test(this.optionsArr[i].text)||(this.optionsArr[i].text=="");

added code will always show option with empty text ( if it was loaded in combo, of course ) actually it can be changed to any custom value here