mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-03 11:36:47 +00:00
snapshottree: remove sorter before saving the state
extjs saves the state including the sorter, but cannot serialize the sorter function. when restoring the state, it is not a valid sorter, so we delete it before saving Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
b35f19a3dc
commit
90ba9a4e02
@ -96,6 +96,15 @@ Ext.define('PVE.lxc.SnapshotTree', {
|
||||
|
||||
},
|
||||
|
||||
listeners: {
|
||||
beforestatesave: function(grid, state, eopts) {
|
||||
// extjs cannot serialize functions,
|
||||
// so a the sorter with only the sorterFn will
|
||||
// not be a valid sorter when restoring the state
|
||||
delete state.storeState.sorters;
|
||||
}
|
||||
},
|
||||
|
||||
initComponent: function() {
|
||||
var me = this;
|
||||
|
||||
|
@ -94,6 +94,15 @@ Ext.define('PVE.qemu.SnapshotTree', {
|
||||
|
||||
},
|
||||
|
||||
listeners: {
|
||||
beforestatesave: function(grid, state, eopts) {
|
||||
// extjs cannot serialize functions,
|
||||
// so a the sorter with only the sorterFn will
|
||||
// not be a valid sorter when restoring the state
|
||||
delete state.storeState.sorters;
|
||||
}
|
||||
},
|
||||
|
||||
initComponent: function() {
|
||||
var me = this;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user