primefaces / primeng

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

Table: ColumnFilter is applied on enter but not on click outside #16310

Open puschie286 opened 2 months ago

puschie286 commented 2 months ago

Describe the bug

ColumnFilter applies the filter on enter - but not on click outside. In both cases is the filter value saved and visually applied.

This results in an invalid visual state: grafik ( Pressing ESC results in the same invalid state )

Same behavior for display row and menu.

Environment

Tested on documentation page

Reproducer

https://primeng.org/table#filter

Angular version

17.3.2

PrimeNG version

17.18.7

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.12.2

Browser(s)

Chrome

Steps to reproduce the behavior

  1. Enter value into text filter (display=row)
  2. Click outside of filter
  3. See visually applied filter but no change in table content

Expected behavior

For display row or menu (when showButtons = false or showApplyButton = false ):

  1. Enter value into text filter
  2. Click outside of filter
  3. Filter is applied OR Filter value is discarded ( i think applying is more what the user expect )
puschie286 commented 2 months ago

note: if you delete your filter value (clear the input), its immediately applied (so its behave different than entering)

Suggestions: filter is only applied on focus lost (regardless if you enter or delete the value). Addition: Option to only apply on Enter and discard filter changes on focus lost