github starfederation/datastar v1.0.0-RC.3

latest releases: v1.0.0-RC.5, v1.0.0-RC.4
one month ago

This release packs some new features, cleans up data-bind behavior, and fixes a rake of minor bugs.

  • Added support for patching html, head, and body elements.
  • Added support for patching arbitrary fragments into the DOM given a selector is provided.
  • Added support for passing include and exclude filters in as strings.
  • Added a __filter modifier to data-query-string that filters out empty values when syncing signals to query string params.
  • When a signal is predefined, its type is now preserved during binding – whenever the element’s value changes, the signal value is automatically converted to match the original type.
  • Custom keys in data-persist are now added as data-persist-mykey, and the __key modifier has been removed.
  • Numeric signal names are now correctly parsed.
  • Fixed a regression in which data-attr values were not being JSON encoded.
  • Fixed a bug in which data-text and data-json-signals would not reapply themselves after their text was changed.
  • Fixed a bug in which attributes that had a prefix with the same length as the alias would not be ignored (e.g. data-option-load would be applied as on-load).
  • Fixed a bug in which the retries-failed event was named retrying.
  • Fixed a bug in which the remove mode would fail when patching elements if no elements were provided.
  • Fixed a bug in which data-class would enter an infinite loop if there were multiple such attributes on the same element.
  • Fixed a bug in which attribute plugins on child elements were not cleaned up when removed.
  • Removed support for using the ID of a provided element as a selector for the remove mode when patching elements.
  • Changed the behavior of how input values are diffed when morphed:
Old input value New input value Behavior
null null preserve old input value
some value the same value preserve old input value
some value null set old input value to ""
null some value set old input value to new input value
some value some other value set old input value to new input value

Don't miss a new datastar release

NewReleases is sending notifications on new releases.