Skip to content

Commit

Permalink
fix(kdropdown): close on popover click (#2224)
Browse files Browse the repository at this point in the history
  • Loading branch information
portikM authored and adamdehaven committed Jun 15, 2024
1 parent 8dbdc8a commit c9203a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions sandbox/pages/SandboxDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
trigger-text="Slotted content positioning"
width="250"
>
<template #items>
<template #items="{ closeDropdown }">
<KDropdownItem>
Updates
<KBadge
Expand All @@ -233,15 +233,19 @@
14
</KBadge>
</KDropdownItem>
<KDropdownItem>
<KDropdownItem @click="handleItemClick">
Support
<KBadge
appearance="success"
shape="rectangular"
>
Enterprise
</KBadge>
<ExternalLinkIcon class="dropdown-item-content-end" />
<KExternalLink
class="dropdown-item-content-end"
href="https://kongponents.konghq.com/"
@click.stop="closeDropdown"
/>
</KDropdownItem>
<KDropdownItem>
<BookIcon />
Expand Down
2 changes: 1 addition & 1 deletion src/components/KDropdown/KDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<KPop
ref="kPop"
v-bind="boundKPopAttributes"
:close-on-popover-click="!isToggled.value"
close-on-popover-click
data-testid="k-dropdown-popover"
hide-close-icon
@close="() => handleTriggerToggle(isToggled, toggle, false)"
Expand Down

0 comments on commit c9203a9

Please sign in to comment.