diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index b4f31799f..56293ebc5 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -165,10 +165,7 @@ async function fetchFilter(val) { async function filterHandler(val, update) { if (!$props.defaultFilter) return update(); - let newOptions; - if ($props.url && !isLoading.value) { - return; - } else newOptions = filter(val, myOptionsOriginal.value); + const newOptions = filter(val, myOptionsOriginal.value); update( () => { myOptions.value = newOptions; @@ -191,11 +188,9 @@ async function onScroll(scrollEv) { if (direction === 'decrease') return; if (to === lastIndex && arrayData.store.hasMoreData && !isLoading.value) { isLoading.value = true; - !$props.url && (await $props.fetchRef.paginate()); - $props.url && (await arrayData.loadMore()); + await arrayData.loadMore(); setOptions(arrayData.store.data); vnSelectRef.value.scrollTo(lastIndex); - isLoading.value = false; } }