fix observer optimization, kinda?
parent
699335243f
commit
09bf9371d7
|
@ -17,7 +17,15 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { identify, useEntity } from "@/lib/entity";
|
||||
import { computed, ComputedRef, defineComponent, onMounted, ref } from "vue";
|
||||
import { IEntry } from "@/types/base";
|
||||
import {
|
||||
computed,
|
||||
ComputedRef,
|
||||
defineComponent,
|
||||
onMounted,
|
||||
reactive,
|
||||
ref,
|
||||
} from "vue";
|
||||
import HashBadge from "./HashBadge.vue";
|
||||
|
||||
export default defineComponent({
|
||||
|
@ -55,9 +63,13 @@ export default defineComponent({
|
|||
});
|
||||
|
||||
// Identification
|
||||
const { attributes } = useEntity(props.address);
|
||||
const inferredIds: ComputedRef<string[]> = computed(() => {
|
||||
return identify(attributes).value.map((eid) => eid.value);
|
||||
if (visible.value) {
|
||||
const { attributes } = useEntity(props.address);
|
||||
return identify(attributes).value.map((eid) => eid.value);
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue