fix: ensure the collection tree for search immediately reflects actions performed over it

This commit is contained in:
jamesgeorge007
2024-02-26 17:47:08 +05:30
parent 84fc31e8a9
commit 5b3986a53f

View File

@@ -485,7 +485,7 @@ import { HoppCollection, HoppRESTAuth, HoppRESTRequest } from "@hoppscotch/data"
import { useService } from "dioc/vue"
import * as E from "fp-ts/lib/Either"
import { cloneDeep, isEqual } from "lodash-es"
import { computed, markRaw, nextTick, ref, watch } from "vue"
import { markRaw, nextTick, ref, watchEffect } from "vue"
import { useI18n } from "~/composables/i18n"
import { useReadonlyStream } from "~/composables/stream"
@@ -587,10 +587,8 @@ const editingProperties = ref<{
const confirmModalTitle = ref<string | null>(null)
const isActiveSearchSession = computed(() => !!searchText.value)
watch(isActiveSearchSession, async (newState) => {
if (!newState) {
watchEffect(async () => {
if (!searchText.value) {
filteredCollections.value = []
onSessionEnd.value?.()
return