mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 04:16:00 +00:00
grid focus fix
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
keyText: 'F5',
|
||||
toolbar: true,
|
||||
icon: 'icon reload',
|
||||
enabledStore: derived(currentDataGrid, grid => grid != null),
|
||||
enabledStore: derived(currentDataGrid, grid => grid?.getDisplay().supportsReload),
|
||||
onClick: () => get(currentDataGrid).refresh(),
|
||||
});
|
||||
|
||||
@@ -179,6 +179,7 @@
|
||||
export let onReferenceSourceChanged = undefined;
|
||||
export let onReferenceClick = undefined;
|
||||
export let onSave;
|
||||
export let focusOnVisible = false;
|
||||
|
||||
export let isLoadedAll;
|
||||
export let loadedTime;
|
||||
@@ -226,6 +227,10 @@
|
||||
return changeSetStore;
|
||||
}
|
||||
|
||||
export function getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
export function revertRowChanges() {
|
||||
grider.beginUpdate();
|
||||
for (const index of getSelectedRowIndexes()) {
|
||||
@@ -382,7 +387,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
$: if ($tabVisible && domFocusField) {
|
||||
$: if ($tabVisible && domFocusField && focusOnVisible) {
|
||||
domFocusField.focus();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
cache={$cache}
|
||||
setCache={cache.update}
|
||||
changeSetState={$changeSetStore}
|
||||
focusOnVisible
|
||||
{changeSetStore}
|
||||
{dispatchChangeSet}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user