njleonzhang / vue-data-tables

A simple, customizable and pageable table with SSR support, based on vue2 and element-ui

Home Page:https://njleonzhang.github.io/vue-data-tables

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pagination Not Working

kerimkuscu opened this issue · comments

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.

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.

b61a48e7-aa88-4973-a652-2f0167afc58f

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>

please provide reproduce demo