Skip to content

Commit

Permalink
fix custom perPage for pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
xaksis committed Nov 18, 2017
1 parent 5484301 commit 0c6c244
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
18 changes: 17 additions & 1 deletion dev/App.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<template>
<div>
<vue-good-table :columns="columns" :rows="rows" :line-numbers="true">
<vue-good-table
:paginate="true"
:columns="columns"
:rows="rows"
:line-numbers="true">
<template slot="table-row-before" scope="props">
<td><input type="checkbox" /></td>
</template>
Expand Down Expand Up @@ -68,6 +72,18 @@
}, {
name: "Dan",
age: "40"
}, {
name: "Jane",
age: "24"
}, {
name: "Susan",
age: "16"
}, {
name: "Chris",
age: "55"
}, {
name: "Dan",
age: "40"
},
],
};
Expand Down
5 changes: 3 additions & 2 deletions src/components/Pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
<div class="datatable-length pull-left">
<label>
<span>{{rowsPerPageText}}</span>
<span v-if="perPage" class="perpage-count">{{perPage}}</span>
<select v-if="!perPage" class="browser-default" @change="perPageChanged">
<!-- <span v-if="perPage" class="perpage-count">{{perPage}}</span> -->
<select class="browser-default" @change="perPageChanged">
<option v-if="perPage" :value="perPage">{{perPage}}</option>
<option value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
Expand Down

0 comments on commit 0c6c244

Please sign in to comment.