Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make filterable component work with url #121

Open
mbohal opened this issue Mar 7, 2018 · 0 comments
Open

Make filterable component work with url #121

mbohal opened this issue Mar 7, 2018 · 0 comments
Labels

Comments

@mbohal
Copy link
Member

mbohal commented Mar 7, 2018

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.

@mbohal mbohal added the feature label Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant