Sync added

pull/12/head
Merve Özçifçi 2019-03-20 17:24:30 +03:00
parent 115b9c5720
commit 920c50aec1
3 changed files with 14782 additions and 6 deletions

14778
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -131,6 +131,8 @@ export default {
pageCount: pc
};
this.$emit('change', newPageState);
this.$emit('update:first', first);
this.$emit('update:rows', rows);
}
},
changePageToFirst(event) {

View File

@ -9,7 +9,7 @@
<div class="content-section implementation">
<h3 class="first">Default</h3>
<Paginator :first="first" :rows="rows" :totalRecords="totalRecords" @change="onPageChange($event)" :rowsPerPageOptions="[10,20,30]"></Paginator>
<Paginator :first.sync="first" :rows.sync="rows" :totalRecords="totalRecords" :rowsPerPageOptions="[10,20,30]"></Paginator>
<h3>Custom Template</h3>
<Paginator :first="first2" :rows="rows2" :totalRecords="totalRecords2" @change="onPageChangeCustom($event)" template="FirstPageLink PrevPageLink CurrentPageReport NextPageLink LastPageLink">
@ -41,10 +41,6 @@ export default {
}
},
methods: {
onPageChange(event) {
this.first = event.first;
this.rows = event.rows;
},
onPageChangeCustom(event) {
this.first2 = event.first;
this.rows2 = event.rows;