refactor: improved syntax for preventDefault() call

This commit is contained in:
gabrieljablonski 2025-03-05 22:00:16 -03:00
parent b04b67f148
commit b1b58df0bf

View File

@ -96,13 +96,11 @@ const hasValue = computed(() => {
:username="selectedItem.name" :username="selectedItem.name"
/> />
</Button> </Button>
<!-- NOTE: Without @click.prevent, the dropdown does not behave as expected when used inside a <label> tag. -->
<div <div
:class="{ 'dropdown-pane--open': showSearchDropdown }" :class="{ 'dropdown-pane--open': showSearchDropdown }"
class="dropdown-pane" class="dropdown-pane"
@click=" @click.prevent
// NOTE: Without this, the dropdown does not behave as expected when used inside a <label> tag.
event => event.preventDefault()
"
> >
<div class="flex items-center justify-between mb-1"> <div class="flex items-center justify-between mb-1">
<h4 <h4