Replies: 1 comment
-
You can put any html you want, as well as click handlers in the template using the hits({
// ...
templates: {
item(hit, { html, components }) {
return html`<div>
${components.Highlight({ hit, attribute: 'name' })}
<button onClick=${() => console.log('clicked', hit)}>
do something
</button>
</div>`;
},
},
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried searching for this feature but could not find anything. Is it possible to add action buttons to the results? Looks like there is something similar to what we are looking for in Add To Cart. Our use case would be if we were showing results for documentation (PDF's for example), that we could show a download icon in the results so they could immediately download the file without having to visit it's corresponding page. Also, possibly adding a share button. Any type of actionable button that would provide a shortcut from having to visit the contents page.
Beta Was this translation helpful? Give feedback.
All reactions