v0.3.0
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 accompanyingx-data
orx-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 tox-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 acceptstarget
ortargets
as an option.$ajax()
now acceptsfollowRedirects
to change the redirect behavior of the AJAX request, just like thex-target.nofollow
modifier.- Source files are available in the NPM distribution now.
Full Changelog: v0.2.1...v0.3.0