File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
core/src/elements/dropdown
playground/src/pages/dropdown Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66
77## [ Unreleased]
88
9+ ### Fixed
10+
11+ - Do not click menuitem again
12+
913## [ 0.3.1] - 2024-04-26
1014
1115### Fixed
Original file line number Diff line number Diff line change @@ -255,7 +255,6 @@ export default class DropdownElement extends ImpulseElement {
255255 }
256256 // Click the active menu item.
257257 if ( this . menuItemActive ( menuItem ) ) {
258- menuItem . click ( ) ;
259258 this . open = false ;
260259 this . trigger . focus ( ) ;
261260 this . emit ( 'changed' , { detail : { relatedTarget : menuItem } } ) ;
Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import GdButton from ' ../../components/button.vue' ;
3+
4+ function notify(message : string ) {
5+ alert (message );
6+ }
37 </script >
48
59<template >
@@ -15,6 +19,7 @@ import GdButton from '../../components/button.vue';
1519 type =" button"
1620 data-target =" twc-dropdown.menuItems"
1721 class =" text-gray-900 group flex w-full items-center rounded px-2 py-2 text-sm ui-active:bg-gray-100 disabled:text-gray-400"
22+ @click =" notify('You clicked on Edit')"
1823 >
1924 Edit
2025 </button >
You can’t perform that action at this time.
0 commit comments