mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-05 19:36:49 +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 form = me.formPanel.getForm();
|
||||
let formfields = form.getFields();
|
||||
|
||||
Ext.iterate(values, function(fieldId, val) {
|
||||
var field = form.findField(fieldId);
|
||||
if (field && !field.up('inputpanel')) {
|
||||
field.setValue(val);
|
||||
Ext.iterate(values, function(id, val) {
|
||||
let fields = formfields.filterBy((f) =>
|
||||
(f.id === id || f.name === id || f.dataIndex === id) && !f.up('inputpanel')
|
||||
);
|
||||
fields.each((field) => {
|
||||
field.setValue(val);
|
||||
if (form.trackResetOnLoad) {
|
||||
field.resetOriginalValue();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Ext.Array.each(me.query('inputpanel'), function(panel) {
|
||||
|
Loading…
Reference in New Issue
Block a user