Minor changes in docs (#1033)

* Minor change in active-search docs

You don't want people to believe they need a POST request to run a search query.

* More limitations of hx-preserve
This commit is contained in:
David Guillot 2022-09-06 15:05:19 +02:00 committed by GitHub
parent e4f8105262
commit d6037bde67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -10,8 +10,7 @@ Elements with `hx-preserve` set are preserved by `id` when htmx updates any ance
You *must* set an unchanging `id` on elements for `hx-preserve` to work. You *must* set an unchanging `id` on elements for `hx-preserve` to work.
The response requires an element with the same `id`, but its type and other attributes are ignored. The response requires an element with the same `id`, but its type and other attributes are ignored.
Note that some elements cannot unfortunately be preserved properly, such as iframes or certain types Note that some elements cannot unfortunately be preserved properly, such as `<input type="text">` (focus and caret position are lost), iframes or certain types of videos. To tackle some of these cases we recommend the [morphdom extension](/extensions/morphdom-swap/), which does a more elaborate DOM
of videos. In these cases we recommend the [morphdom extension](/extensions/morphdom-swap/), which does a more elaborate DOM
reconciliation. reconciliation.
### Notes ### Notes

View File

@ -17,7 +17,7 @@ We start with a search input and an empty table:
</h3> </h3>
<input class="form-control" type="search" <input class="form-control" type="search"
name="search" placeholder="Begin Typing To Search Users..." name="search" placeholder="Begin Typing To Search Users..."
hx-post="/search" hx-get="/search"
hx-trigger="keyup changed delay:500ms, search" hx-trigger="keyup changed delay:500ms, search"
hx-target="#search-results" hx-target="#search-results"
hx-indicator=".htmx-indicator"> hx-indicator=".htmx-indicator">