Search childs fix
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
fcaca42b1f
commit
8d7568d9a2
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue