filter-container icon indicating copy to clipboard operation
filter-container copied to clipboard

Support for resetting form

Open cbirdsong opened this issue 2 years ago • 0 comments

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.

cbirdsong avatar Jan 27 '22 15:01 cbirdsong