Skip to content

Commit 56629cc

Browse files
committed
Fix lists pagination breaking on the UI.
1 parent f1fbcd4 commit 56629cc

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

cmd/lists.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ func handleGetLists(c echo.Context) error {
7979
out.Total = out.Results[0].Total
8080
out.Page = pg.Page
8181
out.PerPage = pg.PerPage
82+
if out.PerPage == 0 {
83+
out.PerPage = out.Total
84+
}
85+
8286
return c.JSON(http.StatusOK, okResp{out})
8387
}
8488

frontend/src/views/Lists.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export default Vue.extend({
130130
isFormVisible: false,
131131
queryParams: {
132132
page: 1,
133-
orderBy: 'created_at',
133+
orderBy: 'id',
134134
order: 'asc',
135135
},
136136
};

0 commit comments

Comments
 (0)