p-ColumnFilter : Change of translation for custom filter take in account too late (randomly). #14273
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Describe the bug
When we use custom filter in the p-ColumnFilter we should pass the translation in the input matchModeOptions.
When the translation change we should change this value. For that we can subscribe on event like that in the parent component:
But on the other side in the p-ColumnFilter the matchModeOptions is use in another subscribe:
So if the subcribe in the p-ColumnFilter react in first the componement take the old value of the matchModeOptions and store it in matchModes. The parent component subscribe react and take in account new langage)
=> Result : the change of the matchModeOptions is not take in account and translation appear as the previous langage selected.
In conclusion in p-ColumnFilter an ngOnChanges function is missing to react on the change of matchModeOptions:
Environment
I produce the bug localy on my dev environment.
Reproducer
No response
Angular version
16.2.10
PrimeNG version
16.5.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
16.16.0
Browser(s)
Edge
Steps to reproduce the behavior
No response
Expected behavior
No response
The text was updated successfully, but these errors were encountered: