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:
		
				
					committed by
					
						 Thomas Lamprecht
						Thomas Lamprecht
					
				
			
			
				
	
			
			
			
						parent
						
							2565fdd075
						
					
				
				
					commit
					1dceaed1e9
				
			| @ -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, | ||||
|     defaults: { | ||||
| 	border: false, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user