fix: search on collections > empty state ui (#2912)
fix: collection search filter ui
This commit is contained in:
@@ -188,7 +188,16 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #emptyNode="{ node }">
|
<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
|
<div
|
||||||
class="flex flex-col items-center justify-center p-4 text-secondaryLight"
|
class="flex flex-col items-center justify-center p-4 text-secondaryLight"
|
||||||
>
|
>
|
||||||
@@ -251,19 +260,6 @@
|
|||||||
{{ t("empty.folder") }}
|
{{ t("empty.folder") }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</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>
|
</template>
|
||||||
</SmartTree>
|
</SmartTree>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -437,6 +437,7 @@ const filteredCollections = computed(() => {
|
|||||||
if (isMatch(request.name)) filteredRequests.push(request)
|
if (isMatch(request.name)) filteredRequests.push(request)
|
||||||
}
|
}
|
||||||
for (const folder of collection.folders) {
|
for (const folder of collection.folders) {
|
||||||
|
if (isMatch(folder.name)) filteredFolders.push(folder)
|
||||||
const filteredFolderRequests = []
|
const filteredFolderRequests = []
|
||||||
for (const request of folder.requests) {
|
for (const request of folder.requests) {
|
||||||
if (isMatch(request.name)) filteredFolderRequests.push(request)
|
if (isMatch(request.name)) filteredFolderRequests.push(request)
|
||||||
|
|||||||
Reference in New Issue
Block a user