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: stateful table filters are not properly reset #14903

Closed
RankXen opened this issue Feb 28, 2024 · 0 comments · Fixed by #15052 or #15053
Closed

p-table: stateful table filters are not properly reset #14903

RankXen opened this issue Feb 28, 2024 · 0 comments · Fixed by #15052 or #15053
Assignees
Labels
Component: Documentation Issue or pull request is related to Documentation Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@RankXen
Copy link

RankXen commented Feb 28, 2024

Describe the bug

Stateful table filters seem to be applied when the table loads. However, the filter components do not show the 'selected'/'filled in' values for each filter.

Also, having a input text component (used as a stateful table filter) causes the word "undefined" to appear when you start typing in the

Related to: #14588 , #14888

Environment

Windows 10 Enterprise
64-bit operating system, x64-based processor
PrimeNG 17.8.0
Angular 17.2.x

Mainly tested on Google Chrome

Reproducer

No response

Angular version

17.2.x

PrimeNG version

17.8.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.11.0

Browser(s)

No response

Steps to reproduce the behavior

Steps to reproduce on the PrimeNG documentation site

  1. Open up: https://primeng.org/table#stateful
  2. Fill in a value in the filter (for example 'aaa'), the table gets filtered, you don't see any records
  3. Navigate to another section of the primeng documentation and navigate back to the table, stateful section
  4. You'll notice the table is still filtered, but your the input filter value is not visible (the input is empty)
    Animation

Steps to reproduce in own project

  1. Create a p-table with state (for example session storage)
  2. Bind a filter value to the table filter value as described in the documentation
  3. You'll notice the session filter state is restored but the value won't be visible in UI component you used to filter
    Writing inside an input text filter causes the word 'undefined' to appear:
    Animation

Expected behavior

  1. Filter should be properly restored from local storage / session, be applied to the table, and the UI controls should properly show the applied filter value
  2. When typing inside an input used as a stateful table filter, typing should not cause the word "undefined" to appear inside the text input (Seems to be reported in Table filter set undefined #14588)
@RankXen RankXen added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 28, 2024
@mehmetcetin01140 mehmetcetin01140 added this to the 17.10.0 milestone Feb 29, 2024
@mehmetcetin01140 mehmetcetin01140 self-assigned this Mar 1, 2024
@cetincakiroglu cetincakiroglu modified the milestones: 17.10.0, 17.11.0 Mar 7, 2024
@cetincakiroglu cetincakiroglu added the Component: Documentation Issue or pull request is related to Documentation label Mar 14, 2024
cetincakiroglu added a commit that referenced this issue Mar 14, 2024
Fixed #14903 - p-table: stateful table filters are not properly reset
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation Issue or pull request is related to Documentation Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
3 participants