Edit tags in the middle of input
This commit is contained in:
parent
54379b98e0
commit
fe7edb93ad
9 changed files with 42 additions and 19 deletions
|
|
@ -16,10 +16,11 @@
|
|||
id="search-tags"
|
||||
name="tags"
|
||||
hx-post="/search_tags"
|
||||
hx-trigger="input changed delay:400ms"
|
||||
hx-trigger="input changed"
|
||||
hx-target="next .tags-autocomplete"
|
||||
hx-vals="js:{selection_end: event.target.selectionEnd}"
|
||||
hx-on::after-settle="this.focus(); this.setSelectionRange(-1, -1);"
|
||||
value="{% if let Some(tags_text) = tags_text %}{{ tags_text }}{% endif %}"
|
||||
autofocus
|
||||
/>
|
||||
<ul class="tags-autocomplete" id="search-autocomplete"></ul>
|
||||
<button type="submit">Search</button>
|
||||
|
|
@ -46,7 +47,7 @@
|
|||
title="{{ post.tags }}"
|
||||
>
|
||||
<img src="/files/{{ post.thumbnail }}" />
|
||||
<div>{{ post.rating }}</div>
|
||||
<div>{{ post.rating | upper }}</div>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue