Search childs fix
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
William Buezas 2024-05-27 14:40:33 -03:00
parent fcaca42b1f
commit 8d7568d9a2
1 changed files with 6 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import { useRoute } from 'vue-router';
import { useState } from 'src/composables/useState';
import axios from 'axios';
import { useArrayData } from 'composables/useArrayData';
import { onUnmounted } from 'vue';
const { t } = useI18n();
const route = useRoute();
@ -109,7 +110,7 @@ watch(storeData, async (val) => {
for (let n of state.get('Tree')) {
await fetchNodeLeaves(n);
}
expanded.value = [null];
expanded.value = [null, ...fetchedNodeKeys];
}
previousExpandedNodes.value = new Set(expanded.value);
});
@ -141,6 +142,10 @@ onMounted(async () => {
previousExpandedNodes.value = new Set(expanded.value);
});
onUnmounted(() => {
state.set('Tree', undefined);
});
</script>
<template>