Pagination Not Working
kerimkuscu opened this issue · comments
Kerim Kuşcu commented
Please follow the issue template, or your issue may be closed automatically.
For bug report, provide the following section
Online reproduce
It is important to provide an online sample to reproduce the issue.
- Template for reproducing front-end pagination issue
- Template for reproducing server-end pagination issue
Expected Behavior
Pagination
Current Behavior
Although I use the necessary props, it does not paging.
Steps to Reproduce
Detailed Description
All incoming data is shown in the table. But according to the props structure I have used, it should appear in the table with 20 sherds.
For feature request, provide the following section
Motivation / Use Case
Expected Behavior
Other Information
package.json file
"dependencies": {
"vue-data-tables": "^3.4.4",
"vue-i18n": "^8.15.0",
}
app.js file
// Vue Data Table
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
// set language to EN
import lang from 'element-ui/lib/locale/lang/en';
import enLocale from 'element-ui/lib/locale';
enLocale.use(lang);
// import DataTables and DataTablesServer separately
import { DataTables, DataTablesServer } from 'vue-data-tables';
Vue.use(DataTables);
Vue.use(DataTablesServer);
// import DataTables and DataTablesServer together
import VueDataTables from 'vue-data-tables';
Vue.use(VueDataTables);
Vue file
<data-tables-server :current-page="1" :page-size="20" :data="items" :total="total" :loading="loading" :pagination-props="{background: true, pageSizes: [5, 10, 20]}" :action-col="actionCol">
<el-table-column v-for="title in titles" :prop="title.prop" :label="title.label" :key="title.label"></el-table-column>
</data-tables-server>
Leon Zhang commented
please provide reproduce demo