Skip to content

Commit

Permalink
fix: input page number over range
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyLaw committed Dec 3, 2021
1 parent 0746072 commit 27cba0a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/tables/TableListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,14 @@ export default {
fetchPage(number) {
const pageNumber = parseInt(number) || 1;
// handle input number over range
if (this.lastPage !== '..') {
if (pageNumber > this.lastPage || pageNumber <= 0) {
console.error('number out of range')
return;
}
}
if (this.timelinePagination)
return this.timeline.fetchPage({ pageNumber });
Expand Down

0 comments on commit 27cba0a

Please sign in to comment.