Skip to content

Commit 626b33a

Browse files
committed
BsDropdownMenu: fixed bug where 'update:open' was not emitted when clicking outside the menu boundary.
1 parent 414ca2b commit 626b33a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/components/Menu/BsDropdownMenu.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ export default defineComponent<TBsDropdownMenu>({
4141
const timer = ref<number>();
4242

4343
watch(
44-
() => thisProps.open,
44+
() => thisProps.open as boolean,
4545
(value) => {
46-
isActive.value = <boolean>value;
46+
isActive.value = value;
4747
}
4848
);
4949

src/components/Menu/mixins/dropdownMenuApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export function useRenderDropdownMenu(
103103
onMouseleave: thisOnMouseLeave,
104104
'onUpdate:open': (value: boolean) => {
105105
isActive.value = value;
106+
emit('update:open', value);
106107
},
107108
},
108109
{

0 commit comments

Comments
 (0)