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

fix(queryPreviewList): repeated query loading issue #1566

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

diegopf
Copy link
Contributor

@diegopf diegopf commented Jul 15, 2024

This PR addresses a bug in the QueryPreviewList component that prevents it from loading the next list of queries if the new collection partially overlaps with the previous one. The issue occurs due to the resetting of the queriesStatus, which causes queries that were already loaded to get stuck in a loading state. This prevents the necessary actions from being triggered to load the remaining queries.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that causes existing functionality to not work as expected)
  • Change requires a documentation update

What is the destination branch of this PR?

  • Main
  • Other. Specify:

How has this been tested?

Added a unit test for this scenario and it can be tested manually by changing using some queries to preview and then adding a new one to the collection:

      let queriesPreviewInfo: QueryPreviewInfo[] = [{ query: 't-shirt' }];
      
      queriesPreviewInfo = [{query: 't-shirt'}, {query: 'jeans'}];

Tests performed according to testing guidelines:

@diegopf diegopf requested a review from a team as a code owner July 15, 2024 15:34
@diegopf diegopf merged commit 60aa0c0 into main Jul 18, 2024
4 checks passed
@diegopf diegopf deleted the fix/repeated-query-loading-issue branch July 18, 2024 09:32
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