Fixed few query tool query tool shortcuts. #6065
parent
22f2ac0507
commit
f4ea95da12
|
@ -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,
|
||||
|
|
|
@ -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 (
|
||||
<>
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue