Skip to content

Commit

Permalink
Add reactiviy to fix some regression issues. See #1613
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 committed Dec 1, 2021
1 parent 2246b58 commit 5cf74e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/components/FuzzySearchModal.vue
Expand Up @@ -34,7 +34,7 @@

<script lang="ts" setup>
import fuzzysort from "fuzzysort";
import { computed, nextTick, onMounted, ref } from "vue";
import { computed, nextTick, onMounted, ref, reactive } from "vue";
import { useRouter } from "vue-router";
import { useContainerStore } from "@/stores/container";
import { storeToRefs } from "pinia";
Expand Down Expand Up @@ -77,9 +77,9 @@ const results = computed(() => {
result.score += 1;
}
});
return [...results].sort((a, b) => b.score - a.score).map((i) => i.obj);
return [...results].sort((a, b) => b.score - a.score).map((i) => reactive(i.obj));
} else {
return [...containers.value].sort((a, b) => b.created - a.created);
return [...preparedContainers.value].sort((a, b) => b.created - a.created).map((i) => reactive(i));
}
});
Expand Down

0 comments on commit 5cf74e3

Please sign in to comment.