Change exercise select input from text to search so it adds a clear button on the right

This commit is contained in:
Peter Stockings
2024-11-10 17:50:13 +11:00
parent 2d6c738e3e
commit 16cd4e93e3

View File

@@ -1,7 +1,7 @@
<div class="relative" _="on click from elsewhere set the innerHTML of #exercise-results to ''">
<input
class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500"
id="exercise-search" type="text" name="query" placeholder="Search exercises..."
id="exercise-search" type="search" name="query" placeholder="Search exercises..."
hx-get="{{ url_for('get_exercises', person_id=person_id) }}" hx-target="#exercise-results"
hx-trigger="keyup changed delay:500ms" hx-swap="innerHTML" autocomplete="off" {% if has_value==True %}
value="{{ exercise_name }}" {% endif %}>