updates
This commit is contained in:
+14
-2
@@ -532,7 +532,7 @@ export class Render {
|
|||||||
|
|
||||||
if (input.constructor.prototype) {
|
if (input.constructor.prototype) {
|
||||||
|
|
||||||
if (key === 'type') {
|
if (key === 'type' || key === 'value') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -618,6 +618,10 @@ export class Render {
|
|||||||
|
|
||||||
const input = El('input', { type: field.type, className: 'sp-form-control' });
|
const input = El('input', { type: field.type, className: 'sp-form-control' });
|
||||||
|
|
||||||
|
if (field.value) {
|
||||||
|
input.value = field.value;
|
||||||
|
}
|
||||||
|
|
||||||
if (field.type !== 'hidden' && field.placeholder) {
|
if (field.type !== 'hidden' && field.placeholder) {
|
||||||
input.placeholder = field.placeholder;
|
input.placeholder = field.placeholder;
|
||||||
}
|
}
|
||||||
@@ -766,6 +770,10 @@ export class Render {
|
|||||||
|
|
||||||
Render.setInputAttr(input, field);
|
Render.setInputAttr(input, field);
|
||||||
|
|
||||||
|
if (field.value !== '') {
|
||||||
|
input.value = field.value;
|
||||||
|
}
|
||||||
|
|
||||||
return Render.makeFieldWrapper(field, parent).appendChild(input);
|
return Render.makeFieldWrapper(field, parent).appendChild(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -817,6 +825,8 @@ export class Render {
|
|||||||
input.checked = (val == field.value);
|
input.checked = (val == field.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.value = val;
|
||||||
|
|
||||||
let label = El('label', {}, input, El('span', { className: 'ctrl-indicator' }), text);
|
let label = El('label', {}, input, El('span', { className: 'ctrl-indicator' }), text);
|
||||||
|
|
||||||
label.className = 'radio-label';
|
label.className = 'radio-label';
|
||||||
@@ -872,6 +882,8 @@ export class Render {
|
|||||||
|
|
||||||
Render.setInputAttr(input, field);
|
Render.setInputAttr(input, field);
|
||||||
|
|
||||||
|
input.value = val;
|
||||||
|
|
||||||
input.checked = (val == field.value);
|
input.checked = (val == field.value);
|
||||||
|
|
||||||
label.append(input);
|
label.append(input);
|
||||||
@@ -904,7 +916,7 @@ export class Render {
|
|||||||
input.id = field.id;
|
input.id = field.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (field.value) {
|
if (field.value !== '') {
|
||||||
input.value = field.value;
|
input.value = field.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user