Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Custom Highlight Support for AutoComplete #231

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hi94740
Copy link

@hi94740 hi94740 commented Nov 29, 2019

When I was trying out the AutoComplete prompt I found the highlighting bug. I saw the pr that has fixed the bug but it's just disabling the feature when the highlighting function can't work properly. Also the package on npm doesn't seem to have patched it yet. So I went a step further to add custom highlighting support.
The way I implement it involves adding a new property to the choice objects. I'm not sure if it's a good idea. And I just realized maybe I could achieve the same result without modifying autocomplete.js, by managing choice objects in suggest function. But it's working code and it doesn't seem to affect existing code, so I decided to create this pr.
I also added description and sample code for this feature to readme. Please check it out for details.

See changes in readme for detail.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant