Skip to content

Conversation

@Coderxrohan
Copy link
Contributor

@Coderxrohan Coderxrohan commented Feb 4, 2026

Description

  • This PR fixes an issue where localized filter match mode labels were not applied when stateStorage is enabled in DataTable.
  • The root cause was that table state restoration was happening before the locale was available, causing filters to be initialized with default (English) strings.

What’s changed

  1. Delayed restoreState() until PrimeReactContext.locale is ready.
  2. Ensured state restoration runs only once using a ref guard.
  3. Kept mount logic clean (no timeouts or double filter mutations).
  4. Column widths continue to restore as before.

Result

  • Localized filter labels now work correctly with stateStorage.
  • No behavioral regressions for existing stateful tables.
  • Fix follows existing PrimeReact lifecycle patterns.

Related Issue

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>.

3 similar comments
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>.

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>.

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>.

@Coderxrohan
Copy link
Contributor Author

Hi @melloware,
The fix delays DataTable state restoration until the locale is available, resolving the localized filter labels problem with stateStorage. Would appreciate your review when you have time. Thanks!

@Coderxrohan
Copy link
Contributor Author

Coderxrohan commented Feb 4, 2026

Updated to use [context] as the dependency to make the trigger more defensive,
while still restoring only once via restoredRef.
Thanks for pointing that out!

@melloware melloware merged commit 7427f57 into primefaces:master Feb 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataTable: locale string not applyed

2 participants