Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote Pagination not working on react tabulator #293

Open
amilaofficework opened this issue Aug 6, 2024 · 2 comments
Open

Remote Pagination not working on react tabulator #293

amilaofficework opened this issue Aug 6, 2024 · 2 comments

Comments

@amilaofficework
Copy link

I'm using react tabulator 0.20.3 and trying to use remote pagination. Issue is my data loaded to table (first page with 10 records) but i can't find a way to set last_page value, therefore this only shows 1 as page count in the paging navigation. Also need to know the way of loading next set of data when user clicks on first,next,last or a page number from page navigation


this.options = {
    tooltips: true,
    movableColumns: true,
    pagination: "remote",
    paginationSize: 10,
    ajaxURL: 'dummy_string_url',
    download: true,
    ajaxRequestFunc: (url, config, params) => {
        let workFlowId = this.state.workflowId;
        let exerciseId = this.state.exerciseId;
        let caseState = this.state.caseState;
        let t = this.state.t;
        let _this = this;
        return new Promise(function(resolve, reject) {
            CaseAPI.all(workFlowId, exerciseId,
                caseState, t).then(AllCaseData => {
                // this content is an array of data, otherwise data is not visible on the table, i have tried {"data":[],"last_page":""} to resolve but it gave me a error.
                resolve(AllCaseData.data.content);
            });
        });
    },
    langs: {
        all: {
            pagination: {
                first: t("common.table.pagination.first"),
                first_title: t("common.table.pagination.first_title"),
                last: t("common.table.pagination.last"),
                last_title: t("common.table.pagination.last_title"),
                prev: t("common.table.pagination.prev"),
                prev_title: t("common.table.pagination.prev_title"),
                next: t("common.table.pagination.next"),
                next_title: t("common.table.pagination.next_title")
            }
        }
    }
};

<ReactTabulator columns={columns} options={this.options}/>

Any proper example of remote paging will also a help for me.

@psyfire25
Copy link

Im having what seems to be the same issue with remote pagination. Did you ever gert it working?

@psyfire25
Copy link

I guess not. Has anyone got remote pagination working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants