It’s not so obvious that to clear all property data you need to use setValues().
Also, you need to use editStop() or your data will be cleared only after second click off the button. That’s because editor return value after you clear property.
https://snippet.webix.com/arfoqdnf
setValues:function(data, update){
if (this._settings.complexData)
data = webix.CodeParser.collapseNames(data);
if(!update) this._clear();
for(var key in data){
var line = this.getItem(key);
if (line)
line.value = data[key];
}
this._props_dataset = data;
this.refresh();
},
_clear:function(){
var lines = this._settings.elements;
for (var i=0; i<lines.length; i++)
lines[i].value = "";
},
should be
setValues:function(data, update){
if (this._settings.complexData)
data = webix.CodeParser.collapseNames(data);
if(!update) this.clear();
for(var key in data){
var line = this.getItem(key);
if (line)
line.value = data[key];
}
this._props_dataset = data;
this.refresh();
},
clear:function(){
this.editStop();
var lines = this._settings.elements;
for (var i=0; i<lines.length; i++)
lines[i].value = "";
},