mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-07-05 18:06:04 +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,
|
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,
|
autoDestroyRstore: false,
|
||||||
|
|
||||||
onDestroy: function() {
|
onDestroy: function() {
|
||||||
@ -55,6 +56,9 @@ Ext.define('Proxmox.data.DiffStore', {
|
|||||||
if (config.rstore.isInstance) {
|
if (config.rstore.isInstance) {
|
||||||
rstore = config.rstore;
|
rstore = config.rstore;
|
||||||
} else if (config.rstore.type) {
|
} else if (config.rstore.type) {
|
||||||
|
Ext.applyIf(config.rstore, {
|
||||||
|
autoDestroyRstore: true,
|
||||||
|
});
|
||||||
rstore = Ext.create(`store.${config.rstore.type}`, config.rstore);
|
rstore = Ext.create(`store.${config.rstore.type}`, config.rstore);
|
||||||
} else {
|
} else {
|
||||||
throw 'rstore is not an instance, and cannot autocreate without "type"';
|
throw 'rstore is not an instance, and cannot autocreate without "type"';
|
||||||
|
Loading…
Reference in New Issue
Block a user