Skip to content

Pagination Counter disappears if pagination_element option is used #177

@meatballs

Description

@meatballs

Describe the bug
If you use the pagination_element option to move the pagination controls from their default position, the pagination counter disappears.

To Reproduce

  • Create a tabulator with pagination and pagination_counter options set to True. All works fine.
  • Add the pagination_element option. See the pagination controls move as expected but the counter disappear

Background

This is caused by olifolkerd/tabulator#4488

In the discussion on there, the tabulator maintainer suggested:

That is because the pagination counter is not appended to the pagination element.

The pagination element is just the buttons on the right hand side of the footer, the pagination counter is loaded into the left hand side of the footer. so what you need to be setting is the footerElement.

and then closed the issue. However, that suggestion doesn't work.

The original post pointed correctly to the problem:

The code block to add the pagination counter sits within an if-else chain and the top of that chain start with:

if(!this.table.options.paginationElement){

which means it's never called if the pagination_element option is set.

https://github.com/olifolkerd/tabulator/blob/7333c33730288f7f192943ebc3ed396b2e576fb8/src/js/modules/Page/Page.js#L432-L433

I'll look at creating a PR for this but we'll need to update the tabulator version we're using if that gets merged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions