Skip to content

v0.3.0

Compare
Choose a tag to compare
@imacrayon imacrayon released this 08 Sep 16:56
· 67 commits to main since this release

This release cleans up some edge case bugs, adds some global configuration options, and some new x-target modifiers to handle redirect responses from your server.

Changed

  • x-target now requires an accompanying x-data or x-init, like a normal Alpine directive.
    <!-- Before -->
    <form x-target="...">
    </form>
    
    <tbody>
      <a x-target="...">
    </tbody>
    
    <!-- After -->
    <form x-init x-target="...">
    </form>
    
    <tbody x-init>
      <a x-target="...">
    </tbody>
    
    
  • x-arrange has been renamed to x-merge.
    Do a find and replace in your project: x-arrange -> x-merge.

Fixed

  • Request data is correctly added to the URL query string when issuing a GET request using $ajax().
  • Response promises are unwrapped in the browser console when using the Mock Server.
  • Removed a race condition that was causing flaky tests.

Added

  • x-target.nofollow will cause the browser window to reload when a redirect (3xx) response is encountered. More info in the Handling Redirects section.
  • You can set global configuration options when importing Alpine AJAX in your code.
  • $ajax() now accepts target or targets as an option.
  • $ajax() now accepts followRedirects to change the redirect behavior of the AJAX request, just like the x-target.nofollow modifier.
  • Source files are available in the NPM distribution now.

Full Changelog: v0.2.1...v0.3.0