]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
cbind: allow methods in cbindData
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 4 May 2020 16:19:01 +0000 (18:19 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 4 May 2020 16:19:01 +0000 (18:19 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
mixin/CBind.js

index e00c7b8e100a30c36165123dd33852d1455e90d0..8276047df3a0f64e9d9595f9d48e48d8f7f25de9 100644 (file)
@@ -21,7 +21,12 @@ Ext.define('Proxmox.Mixin.CBind', {
                return me.initialConfig[cname];
            }
            if (cname in me.cbindData) {
-               return me.cbindData[cname];
+               let res = me.cbindData[cname];
+               if (typeof(res) == "function") {
+                   return res(me.initialConfig);
+               } else {
+                   return res;
+               }
            }
            if (cname in me) {
                return me[cname];