You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.
Hello guys,
i am trying to use this plugin to add pagination to my table.
vue --version : 2.9.6
here is the html code : <div class="row"> <div class="col-xs-12 col-md-12"> <vuestic-widget :headerText="$t('tables.basic')"> <div class="table-responsive"> <table class="table table-striped first-td-padding" v-for="itemb in items"> <thead> <tr> <td>N</td> <td>H</td> <td>T</td> <td></td> </tr> </thead> <tbody> <tr> <td>{{itemb.n}}</td> <td>{{itemb.h}}</td> <td>{{itemb.t }}</td> <td></td> </tr> </tbody> </table> <pagination :pagination="pagination" :callback="loadData" :options="paginationOptions"></pagination> </div> </vuestic-widget> </div> </div>
and here is the loadData method that is supposed to be called :
methods :{
loadData() {
const options = {
params: {
paginate: this.pagination.per_page,
page: this.pagination.current_page,
/* additional parameters */
}
};
axios.get('/allBlocks', options)
.then(result =>
{
console.log("all blooocks", result.data)
this.items = result.data;
this.pagination.current_page = 1
this.pagination.last_page = 5
}, error => { console.error(error); });
}
},
i don't understand why is it not working , i have followed the instructions stated, but still ... even the log does not show .. it is like the loadData method is not even called.
Thank you,
The text was updated successfully, but these errors were encountered:
Hello guys,
i am trying to use this plugin to add pagination to my table.
vue --version : 2.9.6
here is the html code :
<div class="row"> <div class="col-xs-12 col-md-12"> <vuestic-widget :headerText="$t('tables.basic')"> <div class="table-responsive"> <table class="table table-striped first-td-padding" v-for="itemb in items"> <thead> <tr> <td>N</td> <td>H</td> <td>T</td> <td></td> </tr> </thead> <tbody> <tr> <td>{{itemb.n}}</td> <td>{{itemb.h}}</td> <td>{{itemb.t }}</td> <td></td> </tr> </tbody> </table> <pagination :pagination="pagination" :callback="loadData" :options="paginationOptions"></pagination> </div> </vuestic-widget> </div> </div>
and here is the loadData method that is supposed to be called :
methods :{
loadData() {
const options = {
params: {
paginate: this.pagination.per_page,
page: this.pagination.current_page,
/* additional parameters */
}
};
axios.get('/allBlocks', options)
.then(result =>
{
console.log("all blooocks", result.data)
this.items = result.data;
this.pagination.current_page = 1
this.pagination.last_page = 5
}, error => { console.error(error); });
}
},
i don't understand why is it not working , i have followed the instructions stated, but still ... even the log does not show .. it is like the loadData method is not even called.
Thank you,
The text was updated successfully, but these errors were encountered: