mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-20 20:47:40 +00:00
diff store: set autoDestroyRstore by default to true for rstore configs
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
eb54b1142e
commit
50fea44c68
@ -24,7 +24,8 @@ Ext.define('Proxmox.data.DiffStore', {
|
||||
|
||||
sortAfterUpdate: false,
|
||||
|
||||
// if set to true, destroy rstore on destruction
|
||||
// if true, destroy rstore on destruction. Defaults to true if a rstore
|
||||
// config is passed instead of an existing rstore instance
|
||||
autoDestroyRstore: false,
|
||||
|
||||
onDestroy: function() {
|
||||
@ -55,6 +56,9 @@ Ext.define('Proxmox.data.DiffStore', {
|
||||
if (config.rstore.isInstance) {
|
||||
rstore = config.rstore;
|
||||
} else if (config.rstore.type) {
|
||||
Ext.applyIf(config.rstore, {
|
||||
autoDestroyRstore: true,
|
||||
});
|
||||
rstore = Ext.create(`store.${config.rstore.type}`, config.rstore);
|
||||
} else {
|
||||
throw 'rstore is not an instance, and cannot autocreate without "type"';
|
||||
|
Loading…
Reference in New Issue
Block a user