refs #7136 perf: remove onPaginate emit
This commit is contained in:
parent
b6f68321af
commit
9ed8a0b51d
|
@ -62,6 +62,10 @@ const $props = defineProps({
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 30,
|
default: 30,
|
||||||
},
|
},
|
||||||
|
fetchRef: {
|
||||||
|
type: Object,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -165,7 +169,8 @@ async function onScroll(scrollEv) {
|
||||||
if (direction === 'decrease') return;
|
if (direction === 'decrease') return;
|
||||||
if (optionIndex > 0 && to === lastIndex && isLoading.value === false) {
|
if (optionIndex > 0 && to === lastIndex && isLoading.value === false) {
|
||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
emit('onPaginate');
|
// emit('onPaginate');
|
||||||
|
await $props.fetchRef.paginate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -87,7 +87,7 @@ const businessTypesRef = ref();
|
||||||
option-label="description"
|
option-label="description"
|
||||||
option-value="code"
|
option-value="code"
|
||||||
v-model="data.businessTypeFk"
|
v-model="data.businessTypeFk"
|
||||||
@on-paginate="(data) => businessTypesRef.paginate()"
|
:fetch-ref="businessTypesRef"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
Loading…
Reference in New Issue