window: ldap auth edit: set view-model form data explicitly on edit

Fix a race that shows up in chrome/chromium by setting the data in
the view-model that is binded to form fields explicitly on edit, this
avoids a race where the default declared in the viewModel data got
applied after the form data was set, thus having the state out of
sync and so marking the field potentially as dirty even if it wasn't.

Reported-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-03-28 17:47:34 +02:00
parent 58bff886fb
commit 4d3a18dfc3

View File

@ -57,7 +57,9 @@ Ext.define('Proxmox.panel.LDAPInputPanel', {
},
onSetValues: function(values) {
let me = this;
values.anonymous_search = values["bind-dn"] ? 0 : 1;
me.getViewModel().set('anonymous_search', values.anonymous_search);
return values;
},