Skip to content

Labs filters drop-downs defaults initialisation  #558

Description

@pral2a

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions