Skip to content

limel-table: changing pageSize in local mode does not update rows rendered per page #4096

Description

@jensgustafsson

Summary

In limel-table with mode="local" and pagination enabled, changing the pageSize prop after init updates the paginator button count (via setMaxPagecalculatePageCount) but the table keeps rendering the old number of rows per page. Tabulator's internal paginationSize is frozen at the init value and nothing re-applies it on prop change.

Flagged by @jgroth in review of #4085 (a pre-existing bug, not introduced there).

Why it wasn't fixed in #4085

The obvious fix is tabulator.setPageSize(this.pageSize) in the pageSizeChanged watcher. But the only public API for this drags in side effects we don't want:

// Tabulator internals
userSetPageSize(size) {
    this.setPageSize(size);   // the part we want
    return this.setPage(1);   // forced — can't opt out via the public method
}

So calling setPageSize:

  • resets the table to page 1, and
  • because this component emits changePage on every local-mode page load (handlePageLoadedchangePage.emit), it also emits a spurious changePage(1) that a consumer may treat as user navigation.

That's a behavior change to the local-mode path, which #4085 (scoped to the remote paginator) deliberately avoids.

What a proper fix needs to consider

  • Whether resetting to page 1 on pageSize change is the desired UX (it's conventional, but should be deliberate).
  • Suppressing or correctly handling the changePage emission for a programmatic resize vs. real user navigation.
  • Interaction with simultaneous page + pageSize prop changes (watcher ordering / transient changePage(1)).
  • Interaction with paginationSizeSelector if/when used.
  • Either using the page module's internal size setter (no forced setPage(1)) or re-applying this.page after resize — and documenting the resulting behavior.

Scope

Local mode only. Remote mode is unaffected (page size comes from the server response; setPageSize is a no-op there).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions