Remove dependency on tail select component and instead role my own to minmise bundle size

This commit is contained in:
Peter Stockings
2026-01-29 12:49:12 +11:00
parent 04fe00412a
commit 509d11443d
13 changed files with 309 additions and 581 deletions

View File

@@ -21,19 +21,13 @@
</div>
{% else %}
<div class="w-full">
<select name="exercise_id"
class="block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500"
_="init js(me)
tail.select(me, {
search: true,
placeholder: 'Filter exercises',
})
end">
{% for exercise in exercises|default([], true) %}
<option value="{{ exercise.exercise_id }}" {% if exercise.exercise_id==exercise_id %}selected{% endif
%}>{{ exercise.name }}</option>
{% endfor %}
</select>
{{ render_partial('partials/custom_select.html',
name='exercise_id',
options=exercises|default([], true),
multiple=false,
search=true,
placeholder='Filter exercises')
}}
</div>
{% endif %}
</td>