fix reactivity

This commit is contained in:
Gauthier Roebroeck 2026-01-14 17:19:43 +08:00
parent 9478a2f00d
commit 6ccb1a21b2

View file

@ -51,7 +51,9 @@ export function usePagination() {
* @param pageSize
*/
export function useItemsPerPage(pageSize: MaybeRefOrGetter<PageSize>) {
const itemsPerPage = computed(() => (pageSize === 'unpaged' ? -1 : (pageSize as number)))
const itemsPerPage = computed(() =>
toValue(pageSize) === 'unpaged' ? -1 : (toValue(pageSize) as number),
)
return {
itemsPerPage: itemsPerPage,