Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p-table with save state (localstorage/sessionstorage) remember old value after delete from filter #10065

Closed
DukaN opened this issue Apr 1, 2021 · 0 comments
Assignees
Labels
LTS-FIXED-9.2.6 Fixed in PrimeNG LTS 9.2.6 LTS-FIXED-10.1.1 Fixed in PrimeNG LTS 10.1.1 Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@DukaN
Copy link

DukaN commented Apr 1, 2021

I'm submitting a ... (check one with "x")

[x ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)
Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.

https://stackblitz.com/edit/primeng-tablestate-demo-uckb6g?file=src%2Fapp%2Fapp.component.html

Current behavior
If user type in filters some text, then deletes it in localstorage/sessionstorage text from filter it still alive. I see that issue exist when p-table doesn't have [paginator]="true". When p-table have [paginator]="true" state working fine.

Expected behavior
When p-table don't have [paginator]="true" and user delete text from filter then should be delete from storage.

Minimal reproduction of the problem with instructions
On section case i paste url with the bug. Be on page press F12 and go to section 'application' -> 'localstorage' -> url stackblitz, and on stackblitz put some text on filter you will see value of filter save in storage. If you remove all characters from filter then in storage will have old value. If you in p-table add '[paginator]="true"' and do same steps, the value from storage will deletes.

What is the motivation / use case for changing the behavior?
I use in production app custom paginator, and after refresh page filters will fill with old value. To remove value user must have clear application storage.

  • Angular version: 11.0.8

  • PrimeNG version: 11.2.3

  • Browser: all

@yigitfindikli yigitfindikli added Status: Pending Review Issue or pull request is being reviewed by Core Team Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Apr 1, 2021
@yigitfindikli yigitfindikli self-assigned this Apr 1, 2021
@yigitfindikli yigitfindikli added this to the 11.3.2 milestone Apr 1, 2021
@yigitfindikli yigitfindikli added LTS-FIXED-10.1.1 Fixed in PrimeNG LTS 10.1.1 LTS-FIXED-9.2.6 Fixed in PrimeNG LTS 9.2.6 and removed LTS-PORTABLE labels Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-FIXED-9.2.6 Fixed in PrimeNG LTS 9.2.6 LTS-FIXED-10.1.1 Fixed in PrimeNG LTS 10.1.1 Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants