fix: search on collections > empty state ui (#2912)
fix: collection search filter ui
This commit is contained in:
@@ -188,7 +188,16 @@
|
||||
/>
|
||||
</template>
|
||||
<template #emptyNode="{ node }">
|
||||
<div v-if="node === null">
|
||||
<div
|
||||
v-if="filterText.length !== 0 && filteredCollections.length === 0"
|
||||
class="flex flex-col items-center justify-center p-4 text-secondaryLight"
|
||||
>
|
||||
<icon-lucide-search class="pb-2 opacity-75 svg-icons" />
|
||||
<span class="my-2 text-center">
|
||||
{{ t("state.nothing_found") }} "{{ filterText }}"
|
||||
</span>
|
||||
</div>
|
||||
<div v-else-if="node === null">
|
||||
<div
|
||||
class="flex flex-col items-center justify-center p-4 text-secondaryLight"
|
||||
>
|
||||
@@ -251,19 +260,6 @@
|
||||
{{ t("empty.folder") }}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
filterText.length !== 0 &&
|
||||
filteredCollections.length === 0 &&
|
||||
node === null
|
||||
"
|
||||
class="flex flex-col items-center justify-center p-4 text-secondaryLight"
|
||||
>
|
||||
<icon-lucide-search class="pb-2 opacity-75 svg-icons" />
|
||||
<span class="my-2 text-center">
|
||||
{{ t("state.nothing_found") }} "{{ filterText }}"
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</SmartTree>
|
||||
</div>
|
||||
|
||||
@@ -437,6 +437,7 @@ const filteredCollections = computed(() => {
|
||||
if (isMatch(request.name)) filteredRequests.push(request)
|
||||
}
|
||||
for (const folder of collection.folders) {
|
||||
if (isMatch(folder.name)) filteredFolders.push(folder)
|
||||
const filteredFolderRequests = []
|
||||
for (const request of folder.requests) {
|
||||
if (isMatch(request.name)) filteredFolderRequests.push(request)
|
||||
|
||||
Reference in New Issue
Block a user