filter-container
filter-container copied to clipboard
Support for resetting form
If would be great there was a way to add a reset button to clear the filter, either by type="reset"
[^1]or a data attribute:
<button type="reset">Reset</button>
<button data-filter-reset>Reset</button>
Bonus points if you could supply a key and only reset those fields, like <button data-filter-reset="continent">Reset Continents</button>
for the set of checkboxes in the example.
[^1]: I don't see type="reset"
too often, not sure if there are weird issues with it or if screen readers are aware of it? MDN discourages using it for UX reasons but it seems pretty reasonable for this kind of form.