Skip to content

Commit

Permalink
use alpine v3 click.outside event name (#83)
Browse files Browse the repository at this point in the history
Alpine v3 deprecates the v2 `click.away` event and marks it for possible future removal, replacing it with `click.outside`.

See v3 release notes: https://alpinejs.dev/upgrade-guide#away-replace-with-outside
  • Loading branch information
Cryptkeeper authored Oct 2, 2024
1 parent c244389 commit e3217fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/layouts/main.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<input class="input" type="search" placeholder="Search..." @click="modal = true; $nextTick(() => $refs.input.focus());"/>
<div class="modal" :class="modal ? 'is-active' : ''" x-show="modal == true">
<div class="modal-background"></div>
<div class="modal-content" @click.away="modal = false;">
<div class="modal-content" @click.outside="modal = false;">
<div class="box">
<h2 class="subtitle">Search</h2>
<p class="control">
Expand All @@ -89,4 +89,4 @@
<button class="modal-close is-large" aria-label="close"></button>
</div>
</div>
{{end}}
{{end}}

0 comments on commit e3217fc

Please sign in to comment.