Skip to content

Commit bdaca2c

Browse files
committed
feat(pagination): add fallback values for paginator props
Updated <AppPaginator> component to include fallback values for from, to, and total properties using || 0. Ensures proper rendering and prevents potential errors when these properties are undefined.
1 parent d5ede87 commit bdaca2c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stubs/page-stub/Index.stub

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@
7575

7676
<AppPaginator
7777
:links="{{ resourceNameCamelPlural }}.links"
78-
:from="{{ resourceNameCamelPlural }}.from"
79-
:to="{{ resourceNameCamelPlural }}.to"
80-
:total="{{ resourceNameCamelPlural }}.total"
78+
:from="{{ resourceNameCamelPlural }}.from || 0"
79+
:to="{{ resourceNameCamelPlural }}.to || 0"
80+
:total="{{ resourceNameCamelPlural }}.total || 0"
8181
class="mt-4 justify-center"
8282
></AppPaginator>
8383

0 commit comments

Comments
 (0)