I have a closable tab which contains grid and grid toolbar. One of toolbar item will show a dialog (#mydialog) on click which contains form.
In console log $('#mydialog form') will show only 1 form. I then close the tab, and reopen tab. Console log again $('#mydialog form') there would be 2 forms. The form number would be incremented everytime i close and reopen tabs.
What's the proper way to unload tab content? Do i have to remove the content in tab onClose event manually?
Edit: It seems closing tabs does not destroy the dialog, so it keeps in memory. When the tab loaded again, a new dialog will be recreated by jeasyui which will make the form become duplicated. When i submit the form the fields would be messy