Commit 88ed0159 authored by Clement Ho's avatar Clement Ho

Fix clear button so that it resets the dropdowns properly

parent e5b061b8
...@@ -117,6 +117,10 @@ ...@@ -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 @@ ...@@ -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) {
......
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