Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced Search locking up browser #2188

Merged
merged 2 commits into from
Aug 17, 2024
Merged

Conversation

areyeslo
Copy link
Collaborator

@areyeslo areyeslo commented Aug 17, 2024

Issue: Multiple Unnecessary Re-renders of ContentList on Search Execution

When the user clicks the Search button in AdvancedSearch component, the executeSearch function is triggered, which subsequently calls fetchResults function within the SearchPage component. This action causes the SearchPage component to re-render, leading to multiple unnecessary re-renders of the ContentList component. Since ContentList is responsible for handling the bolding of search terms, these repeated re-renders can cause freezing the browser.

Solution
To enhance performance and prevent browser freezing, we need to optimize the rendering process so that ContentList re-renders only once after the search results are fetched.

Additional Issue: Search Terms Not Saved on New Search Creation
During testing, when creating a new search, the search terms (searchTerms) are not being saved correctly. This issue occurs because searchTerms are only updated when the user clicks the Search button. We need to ensure that searchTerms are properly included when a new search is created, similar to how they are handled during updates.

Solution
Update the addSearch function to include searchTerms when creating a new search.

@areyeslo areyeslo added subscriber PR contains changes towards the subscriber application, bug Something isn't working labels Aug 17, 2024
@areyeslo areyeslo force-pushed the Hotfix-AdvancedSearchLockingBrowser branch from a63fc2d to a998e82 Compare August 17, 2024 00:35
@areyeslo areyeslo requested a review from Fosol August 17, 2024 00:45
@Fosol Fosol merged commit 068d25c into dev Aug 17, 2024
5 checks passed
@Fosol Fosol deleted the Hotfix-AdvancedSearchLockingBrowser branch August 17, 2024 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working subscriber PR contains changes towards the subscriber application,
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants