Description
‘use strict’;
function initMiniSearch() {
return {
minSearchLength: 2,
isLiveSearchEnabled: 1,
suggestions: [],
validated: true,
suggest() {
const search = this.$refs.searchInput;
this.validated = true;
if (search.value.length >= this.minSearchLength && !this.isLiveSearchEnabled) {
this.fetchSuggestions(search.value);
} else {
this.suggestions = [];
}
},
fetchSuggestions(term) {
fetch(
window.BASE_URL + ‘search/ajax/suggest?’ + new URLSearchParams({q: term}),
{
headers: {
‘X-Requested-With’: ‘XMLHttpRequest’
}
}
)
.then(response => response.json())
.then(result => this.suggestions = result);
},
search(term) {
const search = this.$refs.searchInput;
term = term || search.value;
if (term.length < this.minSearchLength) {
this.validated = false;
} else {
this.validated = true;
search.value = term;
this.$refs.form.submit();
}
},
focusElement(element) {
if (element && element.nodeName === "DIV") {
element.focus();
return true;
} else {
return false;
}
}
}
}
path]:stroke-[1px] max-lgmd:text-white lgmd:[&>path]:stroke-[1.5px]” width=”23″ height=”23″ role=”img”>
search
Search














Mrs Bryan –
Trying this product to replace Metatone which is no longer available. So far hit seems to be working!
Marine-Patriciah Williams –
I am extremely pleased with this company. This and any other product purchased, always arrives within three days.