diff --git a/src/components/common/VnSelectFilter.vue b/src/components/common/VnSelectFilter.vue index 31b0f16ad7..a5ebd80ad0 100644 --- a/src/components/common/VnSelectFilter.vue +++ b/src/components/common/VnSelectFilter.vue @@ -79,7 +79,7 @@ onMounted(() => { if ($props.url && $props.modelValue) fetchFilter($props.modelValue); }); -async function filter(val, options) { +function filter(val, options) { const search = val.toString().toLowerCase(); if (!search) return options; @@ -111,15 +111,15 @@ async function fetchFilter(val) { return dataRef.value.fetch({ fields, where, order: sortBy, limit }); } -async function filterHandler(val, update) { +function filterHandler(val, update) { update( async () => { if (!$props.defaultFilter) return; - if ($props.url) { - myOptions.value = await fetchFilter(val); - return; - } - myOptions.value = await filter(val, myOptionsOriginal.value); + // if ($props.url) { + // myOptions.value = await fetchFilter(val); + // return; + // } + myOptions.value = filter(val, myOptionsOriginal.value); }, (ref) => { if (val !== '' && ref.options.length > 0) {