My app provides a list of items with various filters which can be turned on and off and are reflected automatically in the url.
currentProvince which are mapped to
strings are easy.
The hard part is that some of these filters are mapped to
objects so if I map a given query-parameter to an object, the url displays the stringified object and won’t work between sessions, e.g. email links.
Basically I provide a list of names to choose from, the default when the route is entered (assuming no query-params) is
null meaning that all names appear.
Only after the user clicks one of the buttons lists does that filter get enabled by setting
currentXXX to the object.
Afterwards the user can disable the filter by clicking an
All button which stands for the