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

SearchValue value no longer displayed when go-back to component ( even if stateStorage="session") #16401

Open
JCA69003 opened this issue Sep 18, 2024 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@JCA69003
Copy link

Describe the bug

Hi,

Hi found a bug on the PrimeNG datatable pInputText field (for filter with search value).

<input pInputText type="text" [(ngModel)]="searchValue" (input)="dt.filterGlobal($event.target.value, 'contains')" placeholder="Rechercher" />

I use [stateStorage]="session", it saves the sort column but also this search value filter in the sessionStorage.

However, when I leave and then come-back to the component, this filter is applied based on the searchValue, but the searchValue is no longer displayed in the input, why ?

Thanks for your help,
Best regards,
JC AUDARD

Environment

Windows 10 Professionnel
Node JS 18.13.0
Angular 17
PrimeNG 17.18.10

Reproducer

No response

Angular version

17.3.0

PrimeNG version

17.18.10

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.13.0

Browser(s)

Firefox

Steps to reproduce the behavior

Go to a datatable (configureded with [stateStorage]="session") and apply a filter with the search field on the right.
Leave the component , go to another component
Go-back to the component, the filter input text is empty even if the filter is applied (because saved in session)

Expected behavior

The filter input text should be filled with the searchValue

@JCA69003 JCA69003 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant