windmill-dashboard
windmill-dashboard copied to clipboard
[SOLVED] Profile & Notification menu don't work
I am a back end developer and JS makes my head hurt.
However, after a few hours of mucking about trying to get the menus to toggle visible:invisible, I realised that the issue was which element the @click.away method was on.
TL;DR: Move the @click.away() method up to the
MOVE THE LINE @click.away="closeProfileMenu"
<ul
x-transition:leave="transition ease-in duration-150"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0"
@click.away="closeProfileMenu". // <--- THIS ONE
@keydown.escape="closeProfileMenu"
TO THE '<button>
ELEMENT ABOVE <template>
HERE:
Oh, and it seems that Alpine now calls @click.away
@click.outside
.
Hope that saves someone else hours of scratching their heads!