mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-05 23:06:36 +00:00
window: edit: call setValue on all fields
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
18a6f207ef
commit
b24601aff5
@ -84,15 +84,18 @@ Ext.define('Proxmox.window.Edit', {
|
|||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
var form = me.formPanel.getForm();
|
var form = me.formPanel.getForm();
|
||||||
|
let formfields = form.getFields();
|
||||||
|
|
||||||
Ext.iterate(values, function(fieldId, val) {
|
Ext.iterate(values, function(id, val) {
|
||||||
var field = form.findField(fieldId);
|
let fields = formfields.filterBy((f) =>
|
||||||
if (field && !field.up('inputpanel')) {
|
(f.id === id || f.name === id || f.dataIndex === id) && !f.up('inputpanel')
|
||||||
field.setValue(val);
|
);
|
||||||
|
fields.each((field) => {
|
||||||
|
field.setValue(val);
|
||||||
if (form.trackResetOnLoad) {
|
if (form.trackResetOnLoad) {
|
||||||
field.resetOriginalValue();
|
field.resetOriginalValue();
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Ext.Array.each(me.query('inputpanel'), function(panel) {
|
Ext.Array.each(me.query('inputpanel'), function(panel) {
|
||||||
|
Loading…
Reference in New Issue
Block a user