fix: refs #7354 ZonLocation filter

This commit is contained in:
Javier Segarra 2024-09-30 20:20:51 +02:00
parent 3c5a5c3905
commit e7a2d3aa85
1 changed files with 13 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<script setup>
import { onMounted, ref, computed, watch, onUnmounted } from 'vue';
import { useRoute } from 'vue-router';
import VnInput from 'src/components/common/VnInput.vue';
import { useState } from 'src/composables/useState';
import axios from 'axios';
import { useArrayData } from 'composables/useArrayData';
@ -144,7 +144,8 @@ watch(storeData, async (val) => {
});
const reFetch = async () => {
await arrayData.fetch({ append: false });
const { data } = await arrayData.fetch({ append: false });
nodes.value = data;
};
onMounted(async () => {
@ -182,6 +183,16 @@ onUnmounted(() => {
</script>
<template>
<VnInput
v-if="showSearchBar"
v-model="store.userParams.search"
:placeholder="$t('globals.search')"
@update:model-value="reFetch()"
>
<template #prepend>
<QBtn color="primary" icon="search" dense flat @click="reFetch()" />
</template>
</VnInput>
<QTree
ref="treeRef"
:nodes="nodes"