fix: add debounce to pods and queues search#275
Conversation
Signed-off-by: pggdev <princegupta.ns153@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Code Review
This pull request introduces a custom useDebouncedValue hook to optimize search functionality in the Pods and Queues components, reducing the frequency of API calls. While the implementation improves performance, the reviewer identified a regression in the handleRefresh logic where data may fail to reload if the search state remains unchanged. Additional feedback includes standardizing React state setter naming conventions and correcting minor syntax issues such as missing semicolons.
Signed-off-by: pggdev <princegupta.ns153@gmail.com>
Summary
#274
Adds debounced search for Pods and Queues to avoid sending backend requests on every keystroke.
Changes
Added reusable useDebouncedValue hook.
Updated Pods search to use debounced search text.
Updated Queues search to use debounced search text.
Preserved existing pagination and refresh behavior.