mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that the file name should be reflected on the query tool for the new tab title.
This commit is contained in:
parent
b804f7db03
commit
524626b895
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user