docs update for 1.6.1 release

This commit is contained in:
carson 2021-11-21 06:36:03 -07:00
parent c395c9c2be
commit 66f2edd5f8
3 changed files with 44 additions and 3 deletions

View File

@ -2,6 +2,25 @@
## [1.6.1] - 2021-11-22
* A new `HX-Retarget` header allows you to change the default target of returned content
* The `htmx:beforeSwap` event now includes another configurable property: `detail.isError` which can
be used to indicate if a given response should be treated as an error or not
* The `htmx:afterRequest` event has two new detail properties: `success` and `failed`, allowing you to write
trigger filters in htmx or hyperscript:
```applescript
on htmx:afterRequest[failed]
set #myCheckbox's checked to true
```
* Fixed the `from:` option in [`hx-trigger`](/attributes/hx-trigger) to support `closest <CSS selector>`
and `find <CSS selector>` forms
* Don't boost anchor tags with an explicit `target` set
* Don't cancel all events on boosted elements, only the events that naturally trigger them (click for anchors, submit
for forms)
* Persist revealed state in the DOM so that on history navigation, revealed elements are not re-requested
* Process all [`hx-ext`](/attributes/hx-ext) attributes, even if no other htmx attribute is on the element
* Snapshot the current URL on load so that history support works properly after a page refresh occurs
* Many, many documentation updates (thank you to all the contributors!)
## [1.6.0] - 2021-10-01

View File

@ -40,8 +40,10 @@ can be paired with [`htmx:beforeRequest`](#htmx:beforeRequest) to wrap behavior
* `detail.xhr` - the `XMLHttpRequest`
* `detail.target` - the target of the request
* `detail.requestConfig` - the configuration of the AJAX request
* `detail.succesful` - true if the response has a 20x status code, else false
* `detail.failed` - true if the response does not have a 20x status code, else false
* `detail.succesful` - true if the response has a 20x status code or is marked `detail.isError = false` in the
`htmx:beforeSwap` event, else false
* `detail.failed` - true if the response does not have a 20x status code or is marked `detail.isError = true` in the
`htmx:beforeSwap` event, else false
### <a name="htmx:afterSettle"></a> Event - [`htmx:afterSettle`](#htmx:afterSettle)

View File

@ -1,5 +1,6 @@
---
layout: layout.njk
tags: ['posts', 'announcements']
title: htmx 1.6.0 has been released!
date: 2021-10-02
---
@ -8,9 +9,28 @@ date: 2021-10-02
I'm happy to announce the [1.6.1 release](https://unpkg.com/browse/htmx.org@1.6.1/) of htmx.
### New Features & Major Changes
### New Features
* A new `HX-Retarget` header allows you to change the default target of returned content
* The `htmx:beforeSwap` event now includes another configurable property: `detail.isError` which can
be used to indicate if a given response should be treated as an error or not
* The `htmx:afterRequest` event has two new detail properties: `success` and `failed`, allowing you to write
trigger filters in htmx or hyperscript:
```applescript
on htmx:afterRequest[failed]
set #myCheckbox's checked to true
```
### Improvements & Bug fixes
* Fixed the `from:` option in [`hx-trigger`](/attributes/hx-trigger) to support `closest <CSS selector>`
and `find <CSS selector>` forms
* Don't boost anchor tags with an explicit `target` set
* Don't cancel all events on boosted elements, only the events that naturally trigger them (click for anchors, submit
for forms)
* Persist revealed state in the DOM so that on history navigation, revealed elements are not re-requested
* Process all [`hx-ext`](/attributes/hx-ext) attributes, even if no other htmx attribute is on the element
* Snapshot the current URL on load so that history support works properly after a page refresh occurs
* Many, many documentation updates (thank you to all the contributors!)
Enjoy!