Add static methods for dropdowns to interface with
This commit is contained in:
parent
8ecc2117db
commit
3492ff6784
1 changed files with 15 additions and 0 deletions
|
@ -84,6 +84,21 @@
|
|||
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() {
|
||||
const filteredSearchInput = document.querySelector('.filtered-search');
|
||||
|
||||
|
|
Loading…
Reference in a new issue