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

Swap out Facet aggs request useFetchApiData hook for apiPostRequest. #207

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

mathewjordan
Copy link
Member

@mathewjordan mathewjordan commented Feb 3, 2023

What does this do?

This swaps out the older geFetchApiData in favor the more current apiPostRequest().

Along with this we set the default value for searchTerm that is peeled off of router.query.q to be undefined. There was a React timing bug that sometimes allowed through the default value of an empty string even if a term was set. We now do not make aggregation requests unless we have verified the value of router.query.q. This seems to have fixed the root issue here.

How should we review?

  • Go to /search
  • Complete a search for Berkeley
  • Hit filter, check agg doc_counts,
  • They should remain consistent as the open and close the filter modal.

@mathewjordan mathewjordan requested a review from kdid February 3, 2023 17:13
@mathewjordan mathewjordan self-assigned this Feb 3, 2023
Copy link
Contributor

@kdid kdid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks 👍 to me

@adamjarling adamjarling merged commit 921b61c into deploy/staging Feb 3, 2023
@adamjarling adamjarling deleted the 3541-agg-counts-query branch February 3, 2023 20:24
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.

3 participants