fix hide search when there is 0 elements

This commit is contained in:
Gauthier Roebroeck 2026-03-24 10:45:04 +08:00
parent 5324e3da6c
commit 8f1f29743d
5 changed files with 5 additions and 5 deletions

View file

@ -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<Author> {
return {

View file

@ -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<SchString> {
return {

View file

@ -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<SchString> {
return {

View file

@ -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<SchString> {
return {

View file

@ -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<SchString> {
return {