0
0
Fork 0

Merge pull request 'refs #6862 fixtest' (!190) from 6862-fixTest into test

Reviewed-on: verdnatura/salix-front#190
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
Reviewed-by: JAVIER SEGARRA MARTINEZ <jsegarra@verdnatura.es>
This commit is contained in:
Alex Moreno 2024-02-15 11:28:51 +00:00
commit 67982b3bbb
2 changed files with 3 additions and 2 deletions

View File

@ -79,7 +79,7 @@ onMounted(() => {
if ($props.url && $props.modelValue) fetchFilter($props.modelValue); if ($props.url && $props.modelValue) fetchFilter($props.modelValue);
}); });
function filter(val, options) { async function filter(val, options) {
const search = val.toString().toLowerCase(); const search = val.toString().toLowerCase();
if (!search) return options; if (!search) return options;
@ -119,7 +119,7 @@ async function filterHandler(val, update) {
myOptions.value = await fetchFilter(val); myOptions.value = await fetchFilter(val);
return; return;
} }
myOptions.value = filter(val, myOptionsOriginal.value); myOptions.value = await filter(val, myOptionsOriginal.value);
}, },
(ref) => { (ref) => {
if (val !== '' && ref.options.length > 0) { if (val !== '' && ref.options.length > 0) {

View File

@ -186,6 +186,7 @@ async function upsert() {
url="Suppliers" url="Suppliers"
:fields="['id', 'nickname']" :fields="['id', 'nickname']"
sort-by="nickname" sort-by="nickname"
:is-clearable="false"
> >
<template #option="scope"> <template #option="scope">
<QItem v-bind="scope.itemProps"> <QItem v-bind="scope.itemProps">