Skip to content

Make filterable component work with url #121

@mbohal

Description

@mbohal

When we change the filter, it should modify the query parameters in the URL. When we load the page it should set the filter according to the URL parameters if they are present.

We need to be able to support multiple instances of filterable on one page. We need therefore to identify the data in the URL somehow. I think we should do it via a new data-filter-name attribute on the filter form. If set the URL will be modified and the oparameters in it will be namespaced by its value. If not set, the URL will not be touched. This will make it flexible and it will be backword compatible.

We must be aware of URL length limit (console log error when exceeded).

We must not touch unrelated query parameters.

Remove query parameter from URL when set to default value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions