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

[Web] Fix re-rendering loop in unified resources #49725

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

rudream
Copy link
Contributor

@rudream rudream commented Dec 3, 2024

Purpose

This PR resolves #49504
This PR resolves #49601

This PR fixes a bug causing the unified resources page to rerender multiple times when filtering resources, in some cases in an infinite loop.

This was caused by a 3 year old useEffect in useServerSideSearchPanel which is no longer necessary after the many updates to the resources page and filtering logic since then.

This PR also streamlines our param-setting logic such that params are always set by the primary setParams function from useUrlFiltering, previously there would be places where we directly manipulated the URL via replaceHistory, causing duplicate code and creating a potential for inconsistencies.

changelog: Fix re-rendering bug when filtering Unified Resources

@rudream rudream force-pushed the yassine/fix-rerender-loop branch from 8a572d4 to 07e3007 Compare December 3, 2024 19:26
@rudream rudream added this pull request to the merge queue Dec 4, 2024
Merged via the queue into master with commit 217492c Dec 4, 2024
40 checks passed
@rudream rudream deleted the yassine/fix-rerender-loop branch December 4, 2024 04:22
@public-teleport-github-review-bot

@rudream See the table below for backport results.

Branch Result
branch/v17 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants