Skip to content

cross-contamination between different facets that have the same value #284

@zguillen

Description

@zguillen

Package version (if known): ^2.0.0

Describe the bug

When multiple facets are rendered and have the same value (like 'true') selecting the 'true' value for facet B selects the 'true' value for facet A and facet's A is used in the query (BucketAggreation)

Steps to Reproduce

  1. Customize search facets in Invenio RDM to include a new custom search facet that will have 'true' and 'false' for values (i.e. custom metadata is a fields.Bool in marshmallow schema)
  2. Open network tab of browser's debugger then click on the 'true' checkbox next to the newly added custom search facet, the URL will have included in it, "&is_published=true" instead of the new facet
  3. The search results and facets re-load but with the Status: Published checkbox checked

Expected behavior

When clicking the 'true' checkbox on new facet it's value should be included in query sent via query params on URL and when facets re-load it should be checked

Screenshots (if applicable)

Additional context

Here's what deepwiki said about this:
https://deepwiki.com/search/i-tried-to-add-another-facet-t_8dfde929-db99-4db6-9396-f7091e101dda

When I clicked the 'false' checkbox of my new facet everything behaved as expected (search query was correct and UI rendered my 'false' checkbox as checked) but it should be noted that no other facet on the page had 'false' as an option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions