Skip to content
Snippets Groups Projects
Merged Timothee P requested to merge redmine-issues/13328 into develop
1 file
+ 6
6
Compare changes
  • Side-by-side
  • Inline
@@ -125,11 +125,10 @@ export default {
@@ -125,11 +125,10 @@ export default {
methods: {
methods: {
toggleDropdown(val) {
toggleDropdown(val) {
if (this.isOpen) {
if (this.isOpen) { //* if dropdown is open :
this.input = ''; // * clear input field when closing dropdown
this.input = ''; // * -> clear input field when closing dropdown
} else if (this.search) {
} else if (this.search) { //* if dropdown is closed is a search dropdown:
//* focus on input if is a search dropdown
this.$refs.input.focus({ //* -> focus on input field
this.$refs.input.focus({
preventScroll: true,
preventScroll: true,
});
});
} else if (this.clearable && val.target && this.selected) {
} else if (this.clearable && val.target && this.selected) {
@@ -172,8 +171,9 @@ export default {
@@ -172,8 +171,9 @@ export default {
},
},
clickOutsideDropdown(e) {
clickOutsideDropdown(e) {
if (!e.target.closest(`#custom-dropdown${this.identifier}`))
if (!e.target.closest(`#custom-dropdown${this.identifier}`) && this.isOpen) {
this.toggleDropdown(false);
this.toggleDropdown(false);
 
}
},
},
},
},
};
};
Loading