window/edit: add autoLoadOptions to control API call

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-10-28 11:36:14 +01:00
parent e951e37de4
commit ca204f31df

View 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);
}
},
});