Commit b2c2a62e authored by NataliaTepluhina's avatar NataliaTepluhina Committed by Natalia Tepluhina

Clear search field after label selection

parent c4a14b1e
...@@ -172,6 +172,10 @@ export default { ...@@ -172,6 +172,10 @@ export default {
showDropdown() { showDropdown() {
this.$refs.dropdown.show(); this.$refs.dropdown.show();
}, },
clearSearch() {
this.searchKey = '';
this.setFocus();
},
}, },
}; };
</script> </script>
...@@ -210,6 +214,7 @@ export default { ...@@ -210,6 +214,7 @@ export default {
:attr-workspace-path="attrWorkspacePath" :attr-workspace-path="attrWorkspacePath"
:label-create-type="labelCreateType" :label-create-type="labelCreateType"
@hideCreateView="toggleDropdownContent" @hideCreateView="toggleDropdownContent"
@selectLabel="clearSearch"
/> />
</template> </template>
<template #footer> <template #footer>
......
...@@ -121,6 +121,7 @@ export default { ...@@ -121,6 +121,7 @@ export default {
}, },
handleLabelClick(label) { handleLabelClick(label) {
this.updateSelectedLabels(label); this.updateSelectedLabels(label);
this.$emit('selectLabel');
if (!this.allowMultiselect) { if (!this.allowMultiselect) {
this.$emit('closeDropdown', this.localSelectedLabels); this.$emit('closeDropdown', this.localSelectedLabels);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment