Skip to content

Commit

Permalink
Fix lists pagination breaking on the UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Sep 18, 2021
1 parent f1fbcd4 commit 56629cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cmd/lists.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ func handleGetLists(c echo.Context) error {
out.Total = out.Results[0].Total
out.Page = pg.Page
out.PerPage = pg.PerPage
if out.PerPage == 0 {
out.PerPage = out.Total
}

return c.JSON(http.StatusOK, okResp{out})
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/Lists.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default Vue.extend({
isFormVisible: false,
queryParams: {
page: 1,
orderBy: 'created_at',
orderBy: 'id',
order: 'asc',
},
};
Expand Down

0 comments on commit 56629cc

Please sign in to comment.