]> git.proxmox.com Git - proxmox-backup.git/commitdiff
ui: auth/token selector: tell ExtJS we injected data into the store
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 9 Nov 2020 11:21:02 +0000 (12:21 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 9 Nov 2020 11:21:02 +0000 (12:21 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/form/AuthidSelector.js
www/form/TokenSelector.js

index 9672067b9ebc57a108eb893fb16e05a0dbe6168c..956b1fca00691370c1f4b0dca5e867b55011f1bb 100644 (file)
@@ -60,6 +60,8 @@ Ext.define('PBS.form.AuthidSelector', {
        }
 
        me.store.loadData(records);
+       // we need to re-set the value, ExtJS doesn't knows that we injected data into the store
+       me.setValue(me.value);
        me.validate();
     },
 
index 502fe827476cf62685c06e52cd382f50e6eedee8..078a19dc92b97c6b772f8c28f86c4d26da3354d1 100644 (file)
@@ -31,6 +31,7 @@ Ext.define('PBS.form.TokenSelector', {
     },
 
     onLoad: function(store, data, success) {
+       let me = this;
        if (!success) return;
 
        let tokenStore = this.store;
@@ -49,6 +50,9 @@ Ext.define('PBS.form.TokenSelector', {
        });
 
        tokenStore.loadData(records);
+       // we need to re-set the value, ExtJS doesn't knows that we injected data into the store
+       me.setValue(me.value);
+       me.validate();
     },
 
     listConfig: {