1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

refactor: minor improvements

This commit is contained in:
2022-06-27 18:28:04 +02:00
parent e42c424a13
commit 822af44a47
4 changed files with 16 additions and 4 deletions

View File

@ -125,7 +125,7 @@ const { getSelected: selectedWorkspace } = storeToRefs(workspacesStore);
const { getWorkspace } = workspacesStore;
const { trapRef } = useFocusTrap();
const { trapRef } = useFocusTrap({ disableAutofocus: true });
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const localRow: Ref<{[key: string]: any}> = ref({});
@ -274,6 +274,14 @@ const wrapNumber = (num: number) => {
window.addEventListener('keydown', onKey);
onMounted(() => {
setTimeout(() => {
const inputs = Array.from(document.querySelectorAll<HTMLInputElement>('.modal-container .form-input'));
if (inputs?.length) {
const firstEnabledInput = inputs.find((el) => !el.disabled);
firstEnabledInput?.focus();
}
}, 50);
const rowObj: {[key: string]: unknown} = {};
for (const field of props.fields) {