mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-07 22:53:45 -06:00
Fixed an issue where query tool title did not change after 'Save As' until any new change is made. #6193
This commit is contained in:
parent
c85a9be621
commit
c8d6ff8a6d
@ -30,4 +30,5 @@ Housekeeping
|
||||
Bug fixes
|
||||
*********
|
||||
|
||||
| `Issue #6781 <https://github.com/pgadmin-org/pgadmin4/issues/6193>`_ - Fixed an issue where query tool title did not change after "Save As" until any new change is made.
|
||||
| `Issue #6781 <https://github.com/pgadmin-org/pgadmin4/issues/6781>`_ - Fixed an issue where export servers was not adding extension if not specified.
|
||||
|
@ -146,7 +146,6 @@ export class LayoutDocker {
|
||||
...panelData.internal,
|
||||
...attrs,
|
||||
};
|
||||
this.eventBus.fireEvent(LAYOUT_EVENTS.REFRESH_TITLE, panelId);
|
||||
}
|
||||
|
||||
getInternalAttrs(panelId) {
|
||||
|
@ -457,7 +457,7 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN
|
||||
current_file: fileName,
|
||||
});
|
||||
isDirtyRef.current = false;
|
||||
setPanelTitle(qtPanelDocker, qtPanelId, fileName, {...qtState, current_file: fileName});
|
||||
setPanelTitle(qtPanelDocker, qtPanelId, fileName, {...qtState, current_file: fileName}, isDirtyRef.current);
|
||||
}
|
||||
eventBus.current.fireEvent(QUERY_TOOL_EVENTS.EDITOR_LAST_FOCUS);
|
||||
};
|
||||
|
@ -256,6 +256,9 @@ export function MainToolBar({containerRef, onFilterClick, onManageMacros}) {
|
||||
eventBus.registerListener(QUERY_TOOL_EVENTS.LOAD_FILE_DONE, ()=>{
|
||||
setDisableButton('save', true);
|
||||
});
|
||||
eventBus.registerListener(QUERY_TOOL_EVENTS.SAVE_FILE_DONE, ()=>{
|
||||
setDisableButton('save', true);
|
||||
});
|
||||
eventBus.registerListener(QUERY_TOOL_EVENTS.DATAGRID_CHANGED, (isDirty)=>{
|
||||
setDisableButton('save-data', !isDirty);
|
||||
});
|
||||
|
@ -396,7 +396,6 @@ export default function Query() {
|
||||
}).then(()=>{
|
||||
lastSavedText.current = editorValue;
|
||||
eventBus.fireEvent(QUERY_TOOL_EVENTS.SAVE_FILE_DONE, fileName, true);
|
||||
eventBus.fireEvent(QUERY_TOOL_EVENTS.QUERY_CHANGED, isDirty());
|
||||
pgAdmin.Browser.notifier.success(gettext('File saved successfully.'));
|
||||
}).catch((err)=>{
|
||||
eventBus.fireEvent(QUERY_TOOL_EVENTS.SAVE_FILE_DONE, null, false);
|
||||
|
Loading…
Reference in New Issue
Block a user