grid focus fix

This commit is contained in:
Jan Prochazka
2021-03-10 22:02:54 +01:00
parent 54d17a67d4
commit 5f97f7d922
3 changed files with 15 additions and 3 deletions

View File

@@ -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();
}

View File

@@ -37,6 +37,7 @@
cache={$cache}
setCache={cache.update}
changeSetState={$changeSetStore}
focusOnVisible
{changeSetStore}
{dispatchChangeSet}
/>