#7136 - Enable paginate event in VnSelectFilter #255
|
@ -119,6 +119,8 @@ const arrayData = useURL.value
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
setOptions(options.value);
|
setOptions(options.value);
|
||||||
if (useURL.value) {
|
if (useURL.value) {
|
||||||
|
arrayData.store.userFilter = $props.where;
|
||||||
|
arrayData.store.filter.where = $props.where;
|
||||||
const { data } = await arrayData.fetch({ append: true });
|
const { data } = await arrayData.fetch({ append: true });
|
||||||
setOptions(data);
|
setOptions(data);
|
||||||
return;
|
return;
|
||||||
|
@ -180,9 +182,9 @@ async function filterHandler(val, update) {
|
||||||
myOptionsFiltered.value = [];
|
myOptionsFiltered.value = [];
|
||||||
} else newOptions = filter(val, myOptionsOriginal.value);
|
} else newOptions = filter(val, myOptionsOriginal.value);
|
||||||
if (useURL.value && myOptions.value.length < 1) {
|
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 = { [optionFilter.value]: val };
|
||||||
// arrayData.store.filter.where = buildwhere(val);
|
|
||||||
const { data } = await arrayData.fetch({ append: false });
|
const { data } = await arrayData.fetch({ append: false });
|
||||||
newOptions = data;
|
newOptions = data;
|
||||||
myOptionsFiltered.value = data;
|
myOptionsFiltered.value = data;
|
||||||
|
|
Loading…
Reference in New Issue