fix(lite/treeview): fix host highlighting (#6747)

From a VM view, after selecting an host, the previously selected host remains highlighted
This commit is contained in:
Mathieu
2023-04-04 12:16:52 +02:00
committed by GitHub
parent eb8f098aaf
commit 7e4bd30f04

View File

@@ -6,4 +6,18 @@
<script lang="ts" setup>
import ObjectNotFoundWrapper from "@/components/ObjectNotFoundWrapper.vue";
import { useRoute } from "vue-router";
import { watchEffect } from "vue";
import { useHostStore } from "@/stores/host.store";
import { useUiStore } from "@/stores/ui.store";
const route = useRoute();
const hostStore = useHostStore();
const uiStore = useUiStore();
watchEffect(() => {
uiStore.currentHostOpaqueRef = hostStore.getRecordByUuid(
route.params.uuid as string
)?.$ref;
});
</script>