Filter by checking a few checkboxes, watch the URL and console to see if anything changes (it should)
Copy the URL with its parameters, paste in a new tab and visit the site.
The checkboxes are checked; but the tree is in its default state. Also, when you uncheck checkboxes, the URL doesn't update?
Fixed!
Here are the edits you'll find in this PR:
[x] When you filter, whether it's with regular checkboxes or using the ones that pop up via the search function, applied filters and their categories get added to the URL as parameters;
[x] When you remove a filter, it gets removed from the URL as well -> if a category no longer has any filters, its key also gets removed
[x] When you Clear All Filters, all parameters get removed
[x] Using the Select All option adds / removes all checkboxes in the relevant category individually (this slots together with the existing function of the Select All automatically detecting how many checkboxes are checked within a category and updating accordingly)
[x] If you visit the site with URL parameters, the URL gets read; relevant checkboxes get checked and updated in the checkboxStates object; the tree gets updated via the selectedSpecies store. This happens in the onMount so that it's loaded in as an initial state and doesn't cause any issues with reactivity.
Functional Test
npm run dev
The checkboxes are checked; but the tree is in its default state. Also, when you uncheck checkboxes, the URL doesn't update?
Fixed!
Here are the edits you'll find in this PR: