Ensure that the file name should be reflected on the query tool for the new tab title.

This commit is contained in:
Aditya Toshniwal authored and Akshay Joshi committed 2022-06-28 18:21:08 +05:30
1 parent b804f7db03
commit 524626b895
2 files changed
+1 -1

No files matched your search

@@ -419,6 +419,7 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN
setQtState({
current_file: fileName,
});
isDirtyRef.current = false;
setPanelTitle(panel, fileName, {...qtState, current_file: fileName});
}
};
@@ -282,7 +282,6 @@ export default function Query() {
checkTrojanSource(res.data);
lastSavedText.current = res.data;
eventBus.fireEvent(QUERY_TOOL_EVENTS.LOAD_FILE_DONE, fileName, true);
eventBus.fireEvent(QUERY_TOOL_EVENTS.QUERY_CHANGED, isDirty());
}).catch((err)=>{
eventBus.fireEvent(QUERY_TOOL_EVENTS.LOAD_FILE_DONE, null, false);
eventBus.fireEvent(QUERY_TOOL_EVENTS.HANDLE_API_ERROR, err);