@invopop/popui 0.1.92 → 0.1.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
bind:ref
|
|
19
19
|
data-slot="alert-dialog-content"
|
|
20
20
|
class={cn(
|
|
21
|
-
'bg-background fixed left-1/2 top-1/2 z-[1002] flex flex-col w-full max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-xl overflow-clip',
|
|
21
|
+
'bg-background border border-border fixed left-1/2 top-1/2 z-[1002] flex flex-col w-full max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-xl overflow-clip',
|
|
22
22
|
className
|
|
23
23
|
)}
|
|
24
24
|
>
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
onPageSizeChange,
|
|
21
21
|
data,
|
|
22
22
|
rowCount,
|
|
23
|
+
pageCount,
|
|
23
24
|
manualPagination,
|
|
24
25
|
disabled = false,
|
|
25
26
|
disableJumpToPage = false,
|
|
@@ -36,8 +37,12 @@
|
|
|
36
37
|
// For client-side pagination, use data length directly
|
|
37
38
|
return data?.length ?? 0
|
|
38
39
|
})
|
|
39
|
-
//
|
|
40
|
-
|
|
40
|
+
// Prefer the caller-supplied pageCount when provided (manual pagination): it lets
|
|
41
|
+
// consumers express "Next is available" before an exact rowCount is known. Fall
|
|
42
|
+
// back to deriving from rowCount/data for the client-side default.
|
|
43
|
+
let totalPages = $derived(
|
|
44
|
+
manualPagination && pageCount !== undefined ? pageCount : Math.ceil(totalItems / rowsPerPage) || 1
|
|
45
|
+
)
|
|
41
46
|
|
|
42
47
|
let pageInputValue = $derived(`${currentPage}`)
|
|
43
48
|
|