Fixed few query tool query tool shortcuts. #6065

pull/6426/head
Pravesh Sharma 2023-06-09 18:20:43 +05:30 committed by GitHub
parent 22f2ac0507
commit f4ea95da12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 18 deletions

View File

@ -724,7 +724,8 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN
modal: modal,
params: qtState.params,
preferences: qtState.preferences,
}), [qtState.params, qtState.preferences]);
mainContainerRef: containerRef
}), [qtState.params, qtState.preferences, containerRef.current]);
const queryToolConnContextValue = React.useMemo(()=>({
connected: qtState.connected,

View File

@ -38,7 +38,7 @@ const useStyles = makeStyles((theme)=>({
},
}));
export function ResultSetToolbar({containerRef, canEdit, totalRowCount}) {
export function ResultSetToolbar({canEdit, totalRowCount}) {
const classes = useStyles();
const eventBus = useContext(QueryToolEventsContext);
const queryToolCtx = useContext(QueryToolContext);
@ -150,7 +150,7 @@ export function ResultSetToolbar({containerRef, canEdit, totalRowCount}) {
callback: (e)=>{e.preventDefault(); downloadResult();}
}
},
], containerRef);
], queryToolCtx.mainContainerRef);
return (
<>

View File

@ -629,21 +629,8 @@ def register_query_tool_preferences(self):
)
self.preference.register(
'keyboard_shortcuts', 'btn_conn_status',
gettext('Accesskey (Connection status)'), 'keyboardshortcut',
{
'key': {
'key_code': 84,
'char': 't'
}
},
category_label=PREF_LABEL_KEYBOARD_SHORTCUTS,
fields=accesskey_fields
)
self.preference.register(
'keyboard_shortcuts', 'btn_find_options',
gettext('Accesskey (Find options)'), 'keyboardshortcut',
'keyboard_shortcuts', 'btn_edit_options',
gettext('Accesskey (Edit options)'), 'keyboardshortcut',
{
'key': {
'key_code': 78,