Skip to content

fs-list-filteron="submit" causes unexpected behaviour of (fs-list-element="clear" + fs-list-field="IDENTIFIER") #724

@rtpolx

Description

@rtpolx

Related Attributes
Combination:
fs-list-filteron="submit"
fs-list-element="clear"
fs-list-field="IDENTIFIER"

Describe the bug
When using the fs-list-filteron="submit" attribute on the form with fs-list-element="filters":
The clear-buttons with fs-list-element="clear" + fs-list-field="IDENTIFIER", will not clear IDENTIFIER-specific filters.
Issue does not appear when using either fs-list-filteron="change" or default (fs-list-filteron="input")

To Reproduce

  1. Create a Collection List to be filtered with fs-list-element="list"

  2. Create a form with filters, attribute first div with fs-list-element="filters"

  3. Attribute the filters with fs-list-field="category", fs-list-field="protein" (etc)

  4. Inside every set of filter element, add a Clear link-block.

  5. Attribute each Clear link-block with fs-list-element="clear" and matching fs-list-field="category" / fs-list-field="protein"

  6. Test current setup, the Clear-buttons should now Clear filters with specific identifiers.

  7. So far, so good.

  8. Now, inside the form element with fs-list-element="filters", put fs-list-filteron="submit", as explained in the documentation:Image

  9. Now, the submit button should indeed apply the filters and bypass the default immediate filtering (input)

  10. Once that's settled, try to clear specific filters.

Expected Bug:
Clear-button clears all filters, no matter the identifier set to the Clear-button.

Expected Behaviour:
Clear-button should only clear filters set with matching fs-list-field="IDENTIFIER"

Screenshots
https://github.com/user-attachments/assets/ebe21b41-c79d-4c67-a670-44dc42a547b0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions