primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.31k stars 4.56k forks source link

Table : Reset is not re-paginating correctly if All chosen #12125

Open jeff-a-andersen opened 1 year ago

jeff-a-andersen commented 1 year ago

Describe the bug

If I have the display set to show all "All" in the paginator and filter the table, calls to "reset()" result in the table pagination being recalculated incorrectly.

Environment

VSCode About Version: 1.72.2 (user setup) Commit: d045a5eda657f4d7b676dedbfa7aab8207f8a075 Date: 2022-10-12T22:15:18.074Z Electron: 19.0.17 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Windows_NT x64 10.0.19042 Sandboxed: No

My Environment: Node.js: 16.17.0

package.json: "@angular/animations": "^14.1.0", "@angular/cdk": "^14.1.3", "@angular/common": "^14.1.0", "@angular/compiler": "^14.1.0", "@angular/core": "^14.1.0", "@angular/forms": "^14.1.0", "@angular/platform-browser": "^14.1.0", "@angular/platform-browser-dynamic": "^14.1.0", "@angular/router": "^14.1.0", "primeflex": "^3.2.1", "primeicons": "^6.0.1", "primeng": "^14.0.0",

Reproducer

https://github-ofzbh6.stackblitz.io

Angular version

14.1.0

PrimeNG version

14.0.0

Build / Runtime

Angular CLI App

Language

ALL

Node version (for AoT issues node --version)

16.7.0

Browser(s)

All

Steps to reproduce the behavior

Run the "Reproducer".

When the page first loads, "All" is selected and the pagination shows correctly as one page with the previous/next links disabled.

Now search for something that returns results and then click the "Reset" button. The pagination is now incorrect. It shows multiple pages and the previous/next links are enabled. What it should show is what showed originally when the page was first loaded.

Now search for something that returns NO results and then click the "Reset" button. The pagination is now incorrect. It shows no page number and the previous/next links are enabled. What it should show is what showed originally when the page was first loaded.

NOTE: The problems only occurs if "All" is selected. If any of the numeric items (10, 25, 50) are chosen the reset works fine.

Expected behavior

When "reset()" is called and "All" is selected, the pagination should revert to what was original displayed, as single page with the previous/next links disabled.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

jeff-a-andersen commented 1 year ago

This is still an issue.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

jeff-a-andersen commented 1 year ago

Still happening.

github-actions[bot] commented 11 months ago

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

jeff-a-andersen commented 11 months ago

Still a prob.

maruthumj commented 11 months ago

Hi @jeff-a-andersen when i try to access the link which you have provided to reproduce, i'm getting this error "Cannot use import statement outside a module". can you please help?

jeff-a-andersen commented 11 months ago

Hi @maruthumj , was working fine and now for some reason I had to add "type":"module" to package.json. Now it's working again and the bug still occurs. Thanks

maruthumj commented 11 months ago

@jeff-a-andersen can you please provide the source code of the example that you have provided? It will help me to debug the issue better. thanks!

jeff-a-andersen commented 11 months ago

Hi @maruthumj , here you go: github-ofzbh6.zip

github-actions[bot] commented 7 months ago

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

jeff-a-andersen commented 7 months ago

Still an issue.

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

jandersen-yahoo commented 3 months ago

Still an issue.