fix: Clear selected items when dismissing bulk action dropdowns
This commit is contained in:
+6
-4
@@ -90,6 +90,11 @@ const handleCancel = () => {
|
||||
selectedAgent.value = null;
|
||||
};
|
||||
|
||||
const handleDismiss = () => {
|
||||
selectedAgent.value = null;
|
||||
toggleDropdown(false);
|
||||
};
|
||||
|
||||
const handleToggleDropdown = () => {
|
||||
const willOpen = !showDropdown.value;
|
||||
toggleDropdown();
|
||||
@@ -122,10 +127,7 @@ const handleToggleDropdown = () => {
|
||||
>
|
||||
<DropdownMenu
|
||||
v-if="showDropdown"
|
||||
v-on-click-outside="[
|
||||
() => toggleDropdown(false),
|
||||
{ ignore: [containerRef] },
|
||||
]"
|
||||
v-on-click-outside="[handleDismiss, { ignore: [containerRef] }]"
|
||||
:menu-items="agentMenuItems"
|
||||
:is-loading="isLoading"
|
||||
show-search
|
||||
|
||||
+6
-4
@@ -72,6 +72,11 @@ const handleAssign = () => {
|
||||
selectedLabels.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const handleDismiss = () => {
|
||||
selectedLabels.value = [];
|
||||
toggleDropdown(false);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -102,10 +107,7 @@ const handleAssign = () => {
|
||||
>
|
||||
<DropdownMenu
|
||||
v-if="showDropdown"
|
||||
v-on-click-outside="[
|
||||
() => toggleDropdown(false),
|
||||
{ ignore: [containerRef] },
|
||||
]"
|
||||
v-on-click-outside="[handleDismiss, { ignore: [containerRef] }]"
|
||||
:menu-items="labelMenuItems"
|
||||
show-search
|
||||
:search-placeholder="t('BULK_ACTION.SEARCH_INPUT_PLACEHOLDER')"
|
||||
|
||||
Reference in New Issue
Block a user