refs #7136 perf: remove onPaginate emit
This commit is contained in:
parent
b6f68321af
commit
9ed8a0b51d
|
@ -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();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -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"
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
|
|
Loading…
Reference in New Issue