#7136 - Enable paginate event in VnSelectFilter #255
|
@ -165,7 +165,7 @@ async function onScroll(scrollEv) {
|
||||||
const lastIndex = myOptions.value.length - 1;
|
const lastIndex = myOptions.value.length - 1;
|
||||||
const optionIndex = ref.getOptionIndex();
|
const optionIndex = ref.getOptionIndex();
|
||||||
|
|
||||||
console.log(lastIndex, to, optionIndex);
|
if (!$props.fetchRef) return;
|
||||||
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;
|
||||||
|
|
|
@ -28,6 +28,7 @@ const suppliersRef = ref();
|
||||||
:filter="{ fields: ['id', 'nickname'] }"
|
:filter="{ fields: ['id', 'nickname'] }"
|
||||||
order="nickname"
|
order="nickname"
|
||||||
limit="30"
|
limit="30"
|
||||||
|
auto-load
|
||||||
@on-fetch="(data) => (suppliers = data)"
|
@on-fetch="(data) => (suppliers = data)"
|
||||||
/>
|
/>
|
||||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
||||||
|
@ -86,10 +87,10 @@ const suppliersRef = ref();
|
||||||
:options="suppliers"
|
:options="suppliers"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="nickname"
|
option-label="nickname"
|
||||||
@input-value="suppliersRef.fetch()"
|
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
|
:fetch-ref="suppliersRef"
|
||||||
>
|
>
|
||||||
</VnSelectFilter>
|
</VnSelectFilter>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
|
|
Loading…
Reference in New Issue