darrenjennings / vue-autosuggest

🔍 Vue autosuggest component.
https://darrenjennings.github.io/vue-autosuggest
MIT License
621 stars 91 forks source link

How can I add icon with click handler in renderSuggestion() to execute method #83

Closed jsinhSolanki closed 5 years ago

jsinhSolanki commented 5 years ago

Hey, I am using it in my project and I want list with star icon in it. So when user clicks on star icon list item get pinned. But i can not execute method on click of star icon???? It executes onSelected method always

darrenjennings commented 5 years ago

Currently there is no good way to do this. You could try and do something similar to https://codesandbox.io/s/lyn9n07jz7 but it is trying to use methods that were not originally meant to be in the component's API. I currently have an open issue https://github.com/Educents/vue-autosuggest/issues/52 where I hope to introduce something that would make this easier. Stay tuned.