Commit 3492ff67 authored by Clement Ho's avatar Clement Ho

Add static methods for dropdowns to interface with

parent 8ecc2117
...@@ -84,6 +84,21 @@ ...@@ -84,6 +84,21 @@
loadSearchParamsFromURL(); loadSearchParamsFromURL();
} }
static fillInWord(word) {
const originalValue = document.querySelector('.filtered-search').value;
document.querySelector('.filtered-search').value = `${originalValue} ${word.trim()}`;
}
static loadDropdown(dropdownName) {
dropdownName = dropdownName.toLowerCase();
const match = gl.FilteredSearchTokenKeys.get().filter(value => value.key === dropdownName)[0];
if (match) {
console.log(`🦄 load ${match.key} dropdown`);
}
}
bindEvents() { bindEvents() {
const filteredSearchInput = document.querySelector('.filtered-search'); const filteredSearchInput = document.querySelector('.filtered-search');
......
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