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

BUG: not refreshing the results using region filter after text input filter #9

Open
stefanobini99 opened this issue May 8, 2024 · 2 comments

Comments

@stefanobini99
Copy link

When is being used the text input filter in conjunction with the region filter the latter will not filter the results if used last.

Tested with:

  • Chrome Version 124.0.6367.156 (Official Build) (64-bit)
  • Edge Version 124.0.2478.80 (Official Build) (64 bit)
  • Opera Version 109.0.5097.68 (64 bit)
  • Firefox Version 125.0.3 (64 bit)

Steps to reproduce the error:

  1. Search any country by name (e.g. "ita")
  2. The results are correctly filtered
  3. Select from the option region input some region (e.g. "Africa")
  4. The results are not filtered according to the region filter. Using the provided example the only country appearing in the page should be "Mauritania".
  5. If you go back to the text input field and add or remove any character the results will be correctly filtered

Same behavior doing similar steps (i.e. switching filtering order):

  1. Start filtering by region (e.g. "Africa")
  2. The results are correctly filtered
  3. Filter the countries by name (e.g. "rita")
  4. The results are not filtered according to the region filter. Using the example "Africa" and "rita" should be appear a list of 2 countries: "Mauritania" and "United Kingdom of Great Britain and Northern Ireland"
  5. If you go back to the text input field and add or remove any character the results will be correctly filtered
@catherineisonline
Copy link
Owner

I did reproduce the first scenario but I can't the second one.

When I search the term in the already filtered scenario, writing "rita" filters countries and shows only "Mauritania" which is correct. "United Kingdom of Great Britain and Northern Ireland" is not Africa. At least according to the API and how I know :)))

Screenshot 2024-05-15 at 16 20 38

@stefanobini99
Copy link
Author

stefanobini99 commented May 22, 2024

You're right, I missed something in the second scenario. I will write it again below.

Same behavior doing similar steps (i.e. switching filtering order):

  1. Start filtering by region (e.g. "Africa")
  2. The results are correctly filtered
  3. Filter the countries by name (e.g. "rita")
  4. Again the results are correctly filtered
  5. Remove/change the country filter (select "All"/"Europe")
  6. The results are not filtered according to the region filter. Using the example "Africa" and "rita" should be appear a list of 2 countries: "Mauritania" and "United Kingdom of Great Britain and Northern Ireland"
  7. If you go back to the text input field and add or remove any character the results will be correctly filtered

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

No branches or pull requests

2 participants