ONEARMY / community-platform

A platform to build useful communities that aim to tackle global problems
https://platform.onearmy.earth
MIT License
1.14k stars 402 forks source link

[bug] Spamming Clicking "Research" causes the middle Dropdown to loose it's default #4010

Open johannes-ross opened 1 week ago

johannes-ross commented 1 week ago

Describe the bug On the Research Module of "Project Kamp", the middle (2nd) Dopdown looses it's default value, when clicking the "Research" Link in the top right very fast. Also when you load the page there is a splitsecond, where the middle Dropdown is empty.

To Reproduce Steps to reproduce the behaviour:

  1. Go to the Project Kamp Website
  2. Click on "Research" at the Top Right => Browser will navigate to https://community.projectkamp.com/research and after a quick while to https://community.projectkamp.com/research?sort=LatestUpdated (I think, this is where the error occurs: instead of having a default value and replacing it when there is a different value, it checks if there is a different value and only if there isn't one, it sets a default)
  3. Repeatedly and quickly click on "Research" at the Top Right => Default value for the middle Dropdown is not set

Expected behaviour Once you are on the research page and you click the "Research" again one of two things should happen: A) Don't navigate at all, you are already on the research page B) Default values should always be set when loading the research module

Screenshots Clicking Research quickly and repeatedly empties the middle Dropdown

Additional context For more questions, ask me :)