darrenjennings / vue-autosuggest

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

Add option to give custom highlight class to item as prop #189

Open vivekitis opened 4 years ago

vivekitis commented 4 years ago

Relevant code or config

                [`${componentAttrPrefix}__results-item--highlighted`]: isHighlighted

What you did:

What happened:

Reproduction sandbox/repository:

Problem description: Feature Request. Right now Highlight class can only be changed overriding the className in css that is added by the component. But there needs to be a provision to pass className as a prop to attach to elem at currentIndex, because there are cases when the exact classname is only known after build like using module level scope in vue styles.

Suggested solution: Added Pr. https://github.com/darrenjennings/vue-autosuggest/pull/188. please suggest any improvements if needed. can move prop to sectionConfig if needed.