Reputation: 1
When I click on cross button window is closing but panel data is not getting destroyed. When I open fresh window it opens with old data.
Code:
Ext.create('Ext.window.Window', {
title: 'Address Management',
height: 480,
width: 500,
closeAction: 'close',
id:'Edit',
resizable: true,
items: [{xtype : 'AddAddressPanel'}],
}).show();
I tried with this also:
closeAction: 'hide',
But again same problem. Could you please let me know what should be done?
Upvotes: 0
Views: 2499
Reputation: 5501
The API docs for Ext.panel.Panel closeAction configuration describes two possible values:
destroy
: Remove the window from the DOM and destroy it and all descendant Components. The window will not be available to be redisplayed via the show method.hide
: Hide the window by setting visibility to hidden and applying negative offsets. The window will be available to be redisplayed via the show method.Since destroy
is the default you can just drop the closeAction
configuration.
Upvotes: 1