Commit 9ca1a641 authored by Kushal Pandya's avatar Kushal Pandya

Clear "Labels" dropdown search filter after selection

parent b5325655
...@@ -242,10 +242,16 @@ export default class LabelsSelect { ...@@ -242,10 +242,16 @@ export default class LabelsSelect {
filterable: true, filterable: true,
selected: $dropdown.data('selected') || [], selected: $dropdown.data('selected') || [],
toggleLabel: function(selected, el) { toggleLabel: function(selected, el) {
var $dropdownParent = $dropdown.parent();
var $dropdownInputField = $dropdownParent.find('.dropdown-input-field');
var isSelected = el !== null ? el.hasClass('is-active') : false; var isSelected = el !== null ? el.hasClass('is-active') : false;
var title = selected.title; var title = selected.title;
var selectedLabels = this.selected; var selectedLabels = this.selected;
if ($dropdownInputField.length && $dropdownInputField.val().length) {
$dropdownParent.find('.dropdown-input-clear').trigger('click');
}
if (selected.id === 0) { if (selected.id === 0) {
this.selected = []; this.selected = [];
return 'No Label'; return 'No Label';
......
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