Fix clear button so that it resets the dropdowns properly
This commit is contained in:
parent
e5b061b801
commit
88ed015915
|
@ -117,6 +117,10 @@
|
||||||
item.droplab_hidden = !match && !matchWithoutPrefix;
|
item.droplab_hidden = !match && !matchWithoutPrefix;
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hideDropdown() {
|
||||||
|
this.getCurrentHook().list.hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
global.FilteredSearchDropdown = FilteredSearchDropdown;
|
global.FilteredSearchDropdown = FilteredSearchDropdown;
|
||||||
|
|
|
@ -246,7 +246,15 @@
|
||||||
|
|
||||||
this.filteredSearchInput.value = '';
|
this.filteredSearchInput.value = '';
|
||||||
this.clearSearchButton.classList.add('hidden');
|
this.clearSearchButton.classList.add('hidden');
|
||||||
|
|
||||||
|
// Force dropdown to hide
|
||||||
|
this.mapping[this.currentDropdown].reference.hideDropdown();
|
||||||
|
|
||||||
|
// Re-Load dropdown
|
||||||
this.setDropdown();
|
this.setDropdown();
|
||||||
|
|
||||||
|
// Reposition dropdown so that it is aligned with cursor
|
||||||
|
this.updateDropdownOffset(this.currentDropdown);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkForBackspace(e) {
|
checkForBackspace(e) {
|
||||||
|
|
Loading…
Reference in New Issue