primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Rows per page drop down does not cause an onPageChange event if the current page is the first or the last

Open jonmarozick opened this issue 9 years ago • 1 comments

I'm submitting a bug report

Plunkr Case (Bug Reports)

http://plnkr.co/edit/GfuO5tXS6zzV2oODrEm4?p=preview

Current behavior Rows per page drop down does not cause an onPageChange event if the current page is the first or the last. This commit changed the behavior: https://github.com/primefaces/primeng/commit/c82d42336e8f232b1beb31f55266d48e2e2bd175#diff-cb71560ee8422e03959405be9b9d009e

Expected behavior Rows per page drop down emits an onPageChange event so that a data table can update its row count. The state of the paginator has indeed changed because the number of rows are now different.

Minimal reproduction of the problem with instructions On the Plunkr example or on https://www.primefaces.org/primeng/#/datatable/paginator In the table change the number of rows from 10 to 20. (No change in the data table occurs) Click the next page button to move to page 2. (The number of rows changes to 20) Change the number of rows to 10. (The number of rows in data table immediately changes to 10)

What is the motivation / use case for changing the behavior? Because pages other than the first and last page immediately update the rows of the data table on rows per page change, for consistency, the first and last page should do the same.

Please tell us about your environment: Windows 10, Visual Studio Code, NPM, IIS

  • Angular version: 4.1.0

  • PrimeNG version: 4.2.0-RC.1

  • Browser: all

  • Language: TypeScript 2.3.4

  • Node (for AoT issues): 7.4.0

jonmarozick avatar Sep 12 '17 21:09 jonmarozick

Fixed for 4.2.2 already.

cagataycivici avatar Oct 20 '17 10:10 cagataycivici