7525-devToTest #419

Merged
alexm merged 177 commits from 7525-devToTest into test 2024-06-04 08:06:27 +00:00
1 changed files with 6 additions and 1 deletions
Showing only changes of commit 8d7568d9a2 - Show all commits

View File

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