Skip to content

Commit

Permalink
fix: resolve admin pages pagination bug (#4280)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsh96 authored Sep 11, 2021
1 parent d72aad5 commit 7e997aa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions client/components/admin/admin-pages.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
sort-by='updatedAt',
sort-desc,
hide-default-footer
@page-count="pageTotal = $event"
)
template(slot='item', slot-scope='props')
tr.is-clickable(:active='props.selected', @click='$router.push(`/pages/` + props.item.id)')
Expand Down Expand Up @@ -89,6 +90,7 @@ export default {
selectedPage: {},
pagination: 1,
pages: [],
pageTotal: 0,
headers: [
{ text: 'ID', value: 'id', width: 80, sortable: true },
{ text: 'Title', value: 'title' },
Expand All @@ -108,9 +110,6 @@ export default {
}
},
computed: {
pageTotal () {
return Math.ceil(this.filteredPages.length / 15)
},
filteredPages () {
return _.filter(this.pages, pg => {
if (this.selectedLang !== null && this.selectedLang !== pg.locale) {
Expand Down

0 comments on commit 7e997aa

Please sign in to comment.