bugfix
This commit is contained in:
parent
1f19465f65
commit
f92a8a3f23
@ -504,6 +504,7 @@ bricks.UiText =class extends bricks.UiType {
|
||||
this.value = this.dom_element.innerText;
|
||||
}
|
||||
resultValue(){
|
||||
this.value = this.dom_element.innerText;
|
||||
return this.value;
|
||||
}
|
||||
setValue(v){
|
||||
@ -572,12 +573,17 @@ bricks.UiCode =class extends bricks.UiType {
|
||||
e.replaceChildren();
|
||||
var v = this.opts.value || this.opts.defaultvalue;
|
||||
this.value = v;
|
||||
e.value = v;
|
||||
this.option_widgets = {};
|
||||
for (var i=0; i<data.length; i++){
|
||||
var o = document.createElement('option');
|
||||
o.value = data[i][this.opts.valueField||'value'];
|
||||
o.innerText = bricks.app.i18n._(data[i][this.opts.textField||'text']);
|
||||
this.option_widgets[o.value] = o;
|
||||
if (!v && i == 0){
|
||||
v = o.value;
|
||||
e.value = o.value;
|
||||
}
|
||||
if (o.value == v){
|
||||
o.selected = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user