Summary
In limel-table with mode="local" and pagination enabled, changing the pageSize prop after init updates the paginator button count (via setMaxPage → calculatePageCount) 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 (handlePageLoaded → changePage.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).
Summary
In
limel-tablewithmode="local"and pagination enabled, changing thepageSizeprop after init updates the paginator button count (viasetMaxPage→calculatePageCount) but the table keeps rendering the old number of rows per page. Tabulator's internalpaginationSizeis 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 thepageSizeChangedwatcher. But the only public API for this drags in side effects we don't want:So calling
setPageSize:changePageon every local-mode page load (handlePageLoaded→changePage.emit), it also emits a spuriouschangePage(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
pageSizechange is the desired UX (it's conventional, but should be deliberate).changePageemission for a programmatic resize vs. real user navigation.page+pageSizeprop changes (watcher ordering / transientchangePage(1)).paginationSizeSelectorif/when used.setPage(1)) or re-applyingthis.pageafter resize — and documenting the resulting behavior.Scope
Local mode only. Remote mode is unaffected (page size comes from the server response;
setPageSizeis a no-op there).