Skip to content
This repository was archived by the owner on Jun 28, 2026. It is now read-only.

fix(DataTable): debounce global filter in Customers demo to improve performance#8461

Merged
melloware merged 2 commits into
primefaces:masterfrom
Coderxrohan:fix/datatable-global-filter-debounce-demo
Jan 3, 2026
Merged

fix(DataTable): debounce global filter in Customers demo to improve performance#8461
melloware merged 2 commits into
primefaces:masterfrom
Coderxrohan:fix/datatable-global-filter-debounce-demo

Conversation

@Coderxrohan

Copy link
Copy Markdown
Contributor

Problem

Typing in the global filter of the Customers DataTable demo causes noticeable lag when row count is increased (e.g. 50+ rows), as filters are updated on every keystroke, triggering full table re-renders.

Solution

Applied useDebounce to the global filter input and moved filter updates into a debounced effect so filtering only runs after typing pauses.

Impact

  • Smooth typing for larger datasets
  • No behavior change to filtering logic
  • Demo now reflects recommended performance best practices

Testing

  • Verified locally with 50+ rows
  • Confirmed reduced re-renders using React Profiler

Fixes: #8460 (DataTable demo: noticeable lag and whole-table re-renders when increasing rows (demo reproduction))

@melloware melloware merged commit 9e275c4 into primefaces:master Jan 3, 2026
2 checks passed
@Coderxrohan Coderxrohan deleted the fix/datatable-global-filter-debounce-demo branch February 4, 2026 10:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataTable demo: noticeable lag and whole-table re-renders when increasing rows (demo reproduction)

2 participants