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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user