visionappscz / bootstrap-ui

⚠️ IN MAINTENANCE MODE. Bootstrap UI is a Bootstrap extension for building beautiful web apps user interfaces.
http://www.bootstrap-ui.com
MIT License
64 stars 15 forks source link

Make filterable component work with url #121

Open mbohal opened 6 years ago

mbohal commented 6 years ago

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.