diff --git a/src/components/common/VnSelectFilter.vue b/src/components/common/VnSelectFilter.vue index 831921a28..580b79be2 100644 --- a/src/components/common/VnSelectFilter.vue +++ b/src/components/common/VnSelectFilter.vue @@ -62,6 +62,10 @@ const $props = defineProps({ type: Number, default: 30, }, + fetchRef: { + type: Object, + default: null, + }, }); const { t } = useI18n(); @@ -165,7 +169,8 @@ async function onScroll(scrollEv) { if (direction === 'decrease') return; if (optionIndex > 0 && to === lastIndex && isLoading.value === false) { isLoading.value = true; - emit('onPaginate'); + // emit('onPaginate'); + await $props.fetchRef.paginate(); } } diff --git a/src/pages/Customer/CustomerCreate.vue b/src/pages/Customer/CustomerCreate.vue index 6afa29380..491a049bd 100644 --- a/src/pages/Customer/CustomerCreate.vue +++ b/src/pages/Customer/CustomerCreate.vue @@ -87,7 +87,7 @@ const businessTypesRef = ref(); option-label="description" option-value="code" v-model="data.businessTypeFk" - @on-paginate="(data) => businessTypesRef.paginate()" + :fetch-ref="businessTypesRef" />