site: reset suggestions state when clicking anywhere else

This commit is contained in:
Lucas Gabriel Vuotto 2025-04-28 06:52:23 +00:00
parent 8168bb9715
commit 4a2fb176d8

View file

@ -5,7 +5,8 @@
begin %> begin %>
<div <div
class="layout-flex-item-fullsize position-relative" class="layout-flex-item-fullsize position-relative"
x-data="tagsSuggestions"> x-data="tagsSuggestions"
@click.outside="reset">
<input type="search" name="tags" value="<%= param "tags" %>" <input type="search" name="tags" value="<%= param "tags" %>"
placeholder="Search tags..." placeholder="Search tags..."
x-ref="tags" x-ref="tags"