#7936 improve InvoiceIn #1004

Merged
jorgep merged 55 commits from 7936-improveInvoiceIn into dev 2024-12-18 09:22:09 +00:00
1 changed files with 23 additions and 0 deletions
Showing only changes of commit 2939ddcfb7 - Show all commits

View File

@ -279,6 +279,28 @@ async function onScroll({ to, direction, from, index }) {
}
defineExpose({ opts: myOptions });
function handleKeyDown(event) {
if (event.key === 'Tab') {
event.preventDefault();
const inputValue = vnSelectRef.value?.inputValue;
if (inputValue) {
const matchingOption = myOptions.value.find(
(option) =>
option[optionLabel.value].toLowerCase() === inputValue.toLowerCase()
);
if (matchingOption) {
emit('update:modelValue', matchingOption[optionValue.value]);
} else {
emit('update:modelValue', inputValue);
}
vnSelectRef.value?.hidePopup();
}
}
}
</script>
<template>
@ -303,6 +325,7 @@ defineExpose({ opts: myOptions });
:input-debounce="useURL ? '300' : '0'"
:loading="isLoading"
@virtual-scroll="onScroll"
@keydown="handleKeyDown"
:data-cy="$attrs.dataCy ?? $attrs.label + '_select'"
>
<template #append>