Open ryantownsend opened 6 months ago
There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label.
@keithamus is there anywhere I need to follow this up? (if not, ignore this, just bumping to prevent stale bot closing)
It's great that we've got
stepUp
/stepDown
for number inputs, but in addition to this I'd like to propose aset
and possiblyreset
orclear
for form inputs (set
with an empty value could work forclear
andset
with an 'original' value could work forreset
so all 3 may not be necessary)My use-case is having a bunch of filters on an ecommerce website. Outside the filter form (that might be buried in a closed
<dialog>
), there's a list of active filters, providing quick-access for the user to remove them and widen the search.For the checkbox filters, I can use
<label for="[checkbox-id]">
to uncheck the filters, however with the price filter (two number inputs), there's no way to clear their values without manual JavaScript (afaik),<button invoketarget="[input-id]" invokeaction="set" value="">
would work wonders for this and provide an extensible mechanism to reset/clear individual inputs and no doubt apply to a bunch of other use-cases given that anyvalue
could be set.(sorry if this has already been proposed, I couldn't find anything in the Github issue search!)