Support for resetting form
cbirdsong opened this issue · comments
If would be great there was a way to add a reset button to clear the filter, either by type="reset"
1or 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.
Footnotes
-
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. ↩