#7136 - Enable paginate event in VnSelectFilter #255

Closed
jsegarra wants to merge 86 commits from 7136_vnselectFilter_paginate into dev
1 changed files with 4 additions and 2 deletions
Showing only changes of commit cfc6bc7d11 - Show all commits

View File

@ -119,6 +119,8 @@ const arrayData = useURL.value
onMounted(async () => {
setOptions(options.value);
if (useURL.value) {
arrayData.store.userFilter = $props.where;
arrayData.store.filter.where = $props.where;
const { data } = await arrayData.fetch({ append: true });
setOptions(data);
return;
@ -180,9 +182,9 @@ async function filterHandler(val, update) {
myOptionsFiltered.value = [];
} else newOptions = filter(val, myOptionsOriginal.value);
if (useURL.value && myOptions.value.length < 1) {
// arrayData.store.filter.where = { [optionLabel.value]: val };
arrayData.store.skip = 0;
arrayData.store.filter.skip = 0;
arrayData.store.filter.where = { [optionFilter.value]: val };
// arrayData.store.filter.where = buildwhere(val);
const { data } = await arrayData.fetch({ append: false });
newOptions = data;
myOptionsFiltered.value = data;