I have on my search page a textbox and search button.
I created a facet using Vue.js. Everything is working at the first time that I search for something , but when I digit another text and search for it, my facet is not being updated with the new values.
I tried to following this, but unsuccessful: https://michaelnthiessen.com/force-re-render/
Anyone can save me with that?
function CreateFacetSiteSearch(resultsFacet) {
new Vue({
el: '#facets',
data() {
return {
facets: resultsFacet.Facets,
totalresults: resultsFacet.TotalNumberOfResults
}
}
});
}
CreateFacetSiteSearch(results); => I call this function everytime that I search for a new text.
<div class="search-filter-container" id="facets" v-if="totalresults > 0">
<div class="links-container">
<a href="#" v-for="item in facets" onclick="CallSearchFacet(this)" :result-field-name="item.Item1" :result-count="item.Item2">{{ item.Item1 }} ({{ item.Item2 }})</a>
</div>
</div>