]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
window/edit: add autoLoadOptions to control API call
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 28 Oct 2020 10:36:14 +0000 (11:36 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 28 Oct 2020 10:36:14 +0000 (11:36 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/window/Edit.js

index d7972b64df0251500f3e27d876c762d14745d9c7..c0e305b9af1ba3c7bfa556358f2ab2929fee7c70 100644 (file)
@@ -1,10 +1,11 @@
-// fixme: how can we avoid those lint errors?
 Ext.define('Proxmox.window.Edit', {
     extend: 'Ext.window.Window',
     alias: 'widget.proxmoxWindowEdit',
 
     // autoLoad trigger a load() after component creation
     autoLoad: false,
+    // set extra options like params for the load request
+    autoLoadOptions: undefined,
 
     resizable: false,
 
@@ -383,7 +384,7 @@ Ext.define('Proxmox.window.Edit', {
        });
 
        if (me.autoLoad) {
-           me.load();
+           me.load(me.autoLoadOptions);
        }
     },
 });