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

[bug] Combining ngOptionHighlight with Typeahead #591

Closed
guillaumegarcia13 opened this issue May 31, 2018 · 5 comments · Fixed by #646
Closed

[bug] Combining ngOptionHighlight with Typeahead #591

guillaumegarcia13 opened this issue May 31, 2018 · 5 comments · Fixed by #646

Comments

@guillaumegarcia13
Copy link
Contributor

guillaumegarcia13 commented May 31, 2018

Expected behaviour

Search terms should he highlighted

Actual behaviour

ngOptionHighlight works for a split second
image
but new items replace previous (highlighted) ones and so highlight is no longer displayed.
See this stackblitz: https://stackblitz.com/edit/ng-select-highlight

More Info

ng-select version: 2.0

browser: Chrome 66

reproducible in demo page: NO (haven't seen this combination of options?)

@anjmao
Copy link
Member

anjmao commented May 31, 2018

Hi @guillaumegarcia13, thanks for reporting. it looks like https://github.com/ng-select/ng-select/blob/master/src/ng-select/ng-option-highlight.directive.ts#L30 is causing this issue since ngOnChanges may not be trigger on typeahead items change.

@omexus
Copy link

omexus commented Jul 15, 2018

Hi - I am using version 1.5.2 (w/angular 4) - I read somewhere that changes/fixes would be back compatible but it does not seem the case for this issue, is my only option to upgrade to angular 5 or I may be missing something.

Thanks!

@omexus
Copy link

omexus commented Jul 15, 2018

... I meant I have angular 5 (do I need to migrate to 6?)

@guillaumegarcia13
Copy link
Contributor Author

guillaumegarcia13 commented Jul 15, 2018

I might be mistaken but the commit 08f91ae is only present in 2.3.2 onwards.
The 1.5.2 version is older than the fix.
I don't think that has anything to do with your version of Angular

@omexus
Copy link

omexus commented Jul 22, 2018

Thanks @guillaumegarcia13, the reason of my question is that, after they released v2.0.0 they been maintaining v1.x, currently on 1.5.2. But you may be right, fix for this issue may have not been put (may won't be) on version 1.x.

jakemdunn pushed a commit to jakemdunn/ng-select that referenced this issue Oct 16, 2018
savinger pushed a commit to savinger/ng-select that referenced this issue Nov 1, 2018
varnastadeus pushed a commit that referenced this issue Nov 2, 2018
NickMele pushed a commit to NickMele/ng-select that referenced this issue Apr 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants