Trigger the browser tree destroyed event so the consequences of destroying the tree are handled properly.

This commit is contained in:
Khushboo Vashi
2024-04-26 11:59:53 +05:30
parent 2dd009eb7c
commit 2324337149
3 changed files with 8 additions and 5 deletions

View File

@@ -555,11 +555,12 @@ export default function PreferencesComponent({ ...props }) {
gettext('Object explorer refresh required'),
gettext('An object explorer refresh is required. Do you wish to refresh it now?'),
function () {
pgAdmin.Browser.tree.destroy({
success: function () {
pgAdmin.Browser.tree.destroy().then(
() => {
pgAdmin.Browser.Events.trigger('pgadmin-browser:tree:destroyed', undefined, undefined);
return true;
},
});
}
);
},
function () {
return true;