Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

After the component is in use we can now override it’s its template to display a custom label. Here on line 3, we add the custom label

Code Block
        <script id="vue-hawksearch-popular-container" type="x-template">
                <div v-if="suggestions && suggestions.Popular && suggestions.Popular.length">
                    <h3>Popular searches</h3>
                    <li v-for="popular in suggestions.Popular" :key="popular.Value" class="autosuggest-menu__item">
                        <div v-html="popular.Value"></div>
                    </li>
                </div>
        </script>

...