Refactor case search widget: update hx-get attribute and include collection in hx-vals for improved search functionality
This commit is contained in:
@@ -2,7 +2,9 @@
|
|||||||
<label for="case-search-input" class="form-label">Search cases</label>
|
<label for="case-search-input" class="form-label">Search cases</label>
|
||||||
<input id="case-search-input" name="q" class="form-control" type="search"
|
<input id="case-search-input" name="q" class="form-control" type="search"
|
||||||
placeholder="Type to search cases..."
|
placeholder="Type to search cases..."
|
||||||
hx-get="{% url 'atlas:case_search' %}?collection={{ collection.pk }}"
|
hx-get="{% url 'atlas:case_search' %}"
|
||||||
|
hx-include="#case-search-input"
|
||||||
|
hx-vals='{"collection": "{{ collection.pk }}"}'
|
||||||
hx-target="#case-search-results"
|
hx-target="#case-search-results"
|
||||||
hx-trigger="keyup changed delay:400ms"
|
hx-trigger="keyup changed delay:400ms"
|
||||||
autocomplete="off">
|
autocomplete="off">
|
||||||
|
|||||||
Reference in New Issue
Block a user