fablabs.io icon indicating copy to clipboard operation
fablabs.io copied to clipboard

Labs filters drop-downs defaults initialisation

Open pral2a opened this issue 5 years ago • 0 comments

Describe the bug In /labs when clicking in Filter without setting the "Filter by country" and "Filter by status" drop-down it returns a rails exception.

It looks like the default behaviour of both drop-downs doesn't get properly initialised. When the drop-downs are selected, even if nothing is changed, defaults are set and the filter works properly.

To Reproduce Steps to reproduce the behaviour A:

  1. Go to /labs
  2. Select a Country from the "filter by country" country drop-down
  3. Do not touch / select any option in the "filter by country" nor "filter by status" drop-downs
  4. Click on "Filter"
  5. See error

To Reproduce Steps to reproduce the behaviour B:

  1. Go to /labs
  2. Select a Country from the "filter by country" country drop-down
  3. Do not touch / select any option in the status drop-down
  4. Click on "Filter"
  5. See error

Expected behaviour Drop-downs should be properly initialised with defaults When no country is selected it should return all the labs When no country is selected but a status is set it should filter by status only, matching all countries When no status is selected but a country is set it should filter by country only, matching all status

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Mac OS
  • Browser Chrome
  • Version 84.0.4147.89

pral2a avatar Jul 27 '20 11:07 pral2a