Skip to content

Commit

Permalink
close dropdown menu when a child item is clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherfrontendguy committed Aug 19, 2024
1 parent 01a1c3d commit 98299d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resources/js/plugins/dropdown-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ function handleItems(el, Alpine) {
this.$data.__lastEl =
this.$data.__itemEls[this.$data.__itemEls.length - 1];
},
"@click"() {
this.$data.__close();
},
"@click.outside"() {
this.$data.__close();
},
Expand Down

0 comments on commit 98299d3

Please sign in to comment.