[pve-devel] [PATCH v3 manager 18/20] allow child classes of ContentView to specify their own listeners
Fabian Ebner
f.ebner at proxmox.com
Fri Nov 13 14:16:31 CET 2020
Ext.apply would simply overwrite possibly existing listeners. Needed for
introducing the prune button.
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
www/manager6/storage/ContentView.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/www/manager6/storage/ContentView.js b/www/manager6/storage/ContentView.js
index 1cd13c0e..c8c50b3a 100644
--- a/www/manager6/storage/ContentView.js
+++ b/www/manager6/storage/ContentView.js
@@ -357,11 +357,11 @@ Ext.define('PVE.storage.ContentView', {
selModel: sm,
tbar: me.tbar,
columns: columns,
- listeners: {
- activate: reload
- }
});
+ // don't overwrite existing listeners
+ me.listeners = Object.assign({}, { activate: reload }, me.listeners);
+
me.callParent();
}
}, function() {
--
2.20.1
More information about the pve-devel
mailing list