From 8f1f29743d8f8a058704762b24f84f7980920147 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Tue, 24 Mar 2026 10:45:04 +0800 Subject: [PATCH] fix hide search when there is 0 elements --- next-ui/src/components/filter/by/Author.vue | 2 +- next-ui/src/components/filter/by/Genre.vue | 2 +- next-ui/src/components/filter/by/Publisher.vue | 2 +- next-ui/src/components/filter/by/SharingLabel.vue | 2 +- next-ui/src/components/filter/by/Tag.vue | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/next-ui/src/components/filter/by/Author.vue b/next-ui/src/components/filter/by/Author.vue index 4c3c0ad7..165dcf0d 100644 --- a/next-ui/src/components/filter/by/Author.vue +++ b/next-ui/src/components/filter/by/Author.vue @@ -87,7 +87,7 @@ const infiniteItems = computed(() => { ] }) -const hideSearch = computed(() => (infiniteData.value?.pages?.[0]?.totalElements || 100) < 10) +const hideSearch = computed(() => (infiniteData.value?.pages?.[0]?.totalElements || 0) < 10) function toItemType(authorName: string): ItemType { return { diff --git a/next-ui/src/components/filter/by/Genre.vue b/next-ui/src/components/filter/by/Genre.vue index cb3a2d1e..359c8f1b 100644 --- a/next-ui/src/components/filter/by/Genre.vue +++ b/next-ui/src/components/filter/by/Genre.vue @@ -82,7 +82,7 @@ const infiniteItems = computed(() => { ] }) -const hideSearch = computed(() => (infiniteData.value?.pages?.[0]?.totalElements || 100) < 10) +const hideSearch = computed(() => (infiniteData.value?.pages?.[0]?.totalElements || 0) < 10) function toItemType(value: string): ItemType { return { diff --git a/next-ui/src/components/filter/by/Publisher.vue b/next-ui/src/components/filter/by/Publisher.vue index 8cea6108..ccd506ae 100644 --- a/next-ui/src/components/filter/by/Publisher.vue +++ b/next-ui/src/components/filter/by/Publisher.vue @@ -82,7 +82,7 @@ const infiniteItems = computed(() => { ] }) -const hideSearch = computed(() => (infiniteData.value?.pages?.[0]?.totalElements || 100) < 10) +const hideSearch = computed(() => (infiniteData.value?.pages?.[0]?.totalElements || 0) < 10) function toItemType(value: string): ItemType { return { diff --git a/next-ui/src/components/filter/by/SharingLabel.vue b/next-ui/src/components/filter/by/SharingLabel.vue index ea78903c..ae9ec32d 100644 --- a/next-ui/src/components/filter/by/SharingLabel.vue +++ b/next-ui/src/components/filter/by/SharingLabel.vue @@ -82,7 +82,7 @@ const infiniteItems = computed(() => { ] }) -const hideSearch = computed(() => (infiniteData.value?.pages?.[0]?.totalElements || 100) < 10) +const hideSearch = computed(() => (infiniteData.value?.pages?.[0]?.totalElements || 0) < 10) function toItemType(value: string): ItemType { return { diff --git a/next-ui/src/components/filter/by/Tag.vue b/next-ui/src/components/filter/by/Tag.vue index 9b95b240..e1b3c295 100644 --- a/next-ui/src/components/filter/by/Tag.vue +++ b/next-ui/src/components/filter/by/Tag.vue @@ -87,7 +87,7 @@ const infiniteItems = computed(() => { ] }) -const hideSearch = computed(() => (infiniteData.value?.pages?.[0]?.totalElements || 100) < 10) +const hideSearch = computed(() => (infiniteData.value?.pages?.[0]?.totalElements || 0) < 10) function toItemType(value: string): ItemType { return {