Skip to content

Conversation

seanhess
Copy link
Owner

@seanhess seanhess commented Mar 22, 2025

Encouraged by @benjamin-thomas, I updated the client to force inputs to their value attribute after update. This allows you to clear inputs and more.

  • Manually set input.value to whatever the attribute value is
  • Filter and Autocomplete Example - added a clear button to the search field
  • TodoMVC, Contacts Example - clear form after submission
  • Manually focus the first element with [autofocus]
  • Manually set input.checked to the value of dataset.checked. Added checked helper.

TODO:

  • Form Parsing Checkboxes is broken!
  • Is input[type=checkbox] correct for a generic toggle? (REMOVED)

@seanhess
Copy link
Owner Author

Added support for checkboxes, a toggle as a checkbox, etc.

@seanhess seanhess force-pushed the set-value-clear-input branch from ad02ff7 to fdb691d Compare March 22, 2025 18:56
manual setting of value via js-client

updated other examples to use value

switch to use .getAttribute for value, no need  for data-value
fixed bugs in Example Filters

fix
@seanhess seanhess force-pushed the set-value-clear-input branch from fdb691d to b2c2215 Compare March 24, 2025 14:49
@seanhess seanhess merged commit f3b74a6 into main Mar 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant