ui: DataStorePanel: save active tab statefully

so that the last selected tab for datastores will get selected
the next time any datastore is selected, even across browser
reloads

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-10-27 16:20:11 +01:00 committed by Thomas Lamprecht
parent 2565fdd075
commit 1dceaed1e9
1 changed files with 19 additions and 0 deletions

View File

@ -10,6 +10,25 @@ Ext.define('PBS.DataStorePanel', {
}; };
}, },
stateId: 'pbs-datastore-panel',
stateful: true,
stateEvents: ['tabchange'],
applyState: function(state) {
let me = this;
if (state.tab !== undefined) {
me.setActiveTab(state.tab);
}
},
getState: function() {
let me = this;
return {
tab: me.getActiveTab().getItemId(),
};
},
border: false, border: false,
defaults: { defaults: {
border: false, border: false,