fix: ensure the collection tree for search immediately reflects actions performed over it
This commit is contained in:
@@ -485,7 +485,7 @@ import { HoppCollection, HoppRESTAuth, HoppRESTRequest } from "@hoppscotch/data"
|
|||||||
import { useService } from "dioc/vue"
|
import { useService } from "dioc/vue"
|
||||||
import * as E from "fp-ts/lib/Either"
|
import * as E from "fp-ts/lib/Either"
|
||||||
import { cloneDeep, isEqual } from "lodash-es"
|
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 { useI18n } from "~/composables/i18n"
|
||||||
import { useReadonlyStream } from "~/composables/stream"
|
import { useReadonlyStream } from "~/composables/stream"
|
||||||
@@ -587,10 +587,8 @@ const editingProperties = ref<{
|
|||||||
|
|
||||||
const confirmModalTitle = ref<string | null>(null)
|
const confirmModalTitle = ref<string | null>(null)
|
||||||
|
|
||||||
const isActiveSearchSession = computed(() => !!searchText.value)
|
watchEffect(async () => {
|
||||||
|
if (!searchText.value) {
|
||||||
watch(isActiveSearchSession, async (newState) => {
|
|
||||||
if (!newState) {
|
|
||||||
filteredCollections.value = []
|
filteredCollections.value = []
|
||||||
onSessionEnd.value?.()
|
onSessionEnd.value?.()
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user