mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-12-28 01:41:13 -06:00
Ensure that the Query Editor should be focused when switching between query tool tabs. Fixes #7441
This commit is contained in:
parent
ea3203f466
commit
725726f083
@ -20,5 +20,6 @@ Bug fixes
|
||||
*********
|
||||
|
||||
| `Issue #7411 <https://redmine.postgresql.org/issues/7411>`_ - Fixed an issue where the Database restriction is not working.
|
||||
| `Issue #7441 <https://redmine.postgresql.org/issues/7441>`_ - Ensure that the Query Editor should be focused when switching between query tool tabs.
|
||||
| `Issue #7443 <https://redmine.postgresql.org/issues/7443>`_ - Fixed and issue where 'Use spaces' not working in the query tool.
|
||||
| `Issue #7468 <https://redmine.postgresql.org/issues/7468>`_ - Skip the history records if the JSON info can't be parsed instead of showing 'No history'.
|
||||
|
@ -333,6 +333,7 @@ export default function Layout({groups, getLayoutInstance, layoutId, savedLayout
|
||||
groups={defaultGroups}
|
||||
onLayoutChange={(_l, currentTabId, direction)=>{
|
||||
saveLayout(layoutObj.current, layoutId);
|
||||
direction = direction == 'update' ? 'active' : direction;
|
||||
if(Object.values(LAYOUT_EVENTS).indexOf(direction) > -1) {
|
||||
layoutEventBus.current.fireEvent(LAYOUT_EVENTS[direction.toUpperCase()], currentTabId);
|
||||
}
|
||||
|
@ -318,6 +318,17 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN
|
||||
eventBus.current.fireEvent(QUERY_TOOL_EVENTS.WARN_SAVE_DATA_CLOSE);
|
||||
});
|
||||
|
||||
panel?.on(window.wcDocker.EVENT.VISIBILITY_CHANGED, function() {
|
||||
/* Focus the appropriate panel on visible */
|
||||
if(panel.isVisible()) {
|
||||
if(LayoutHelper.isTabVisible(docker.current, PANELS.QUERY)) {
|
||||
LayoutHelper.focus(docker.current, PANELS.QUERY);
|
||||
} else if(LayoutHelper.isTabVisible(docker.current, PANELS.HISTORY)) {
|
||||
LayoutHelper.focus(docker.current, PANELS.HISTORY);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
pgAdmin.Browser.Events.on('pgadmin-storage:finish_btn:select_file', (fileName)=>{
|
||||
eventBus.current.fireEvent(QUERY_TOOL_EVENTS.LOAD_FILE, fileName);
|
||||
}, pgAdmin);
|
||||
|
Loading…
Reference in New Issue
Block a user