-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix(typeahead): incoming data are not filtered after typeahead kicks-in #3728
fix(typeahead): incoming data are not filtered after typeahead kicks-in #3728
Conversation
af2e229
to
1552274
Compare
Codecov Report
@@ Coverage Diff @@
## development #3728 +/- ##
============================================
Coverage 52.52% 52.52%
============================================
Files 3 3
Lines 99 99
Branches 17 17
============================================
Hits 52 52
Misses 37 37
Partials 10 10 Continue to review full report at Codecov.
|
src/typeahead/typeahead.directive.ts
Outdated
.mergeMap((value: string) => { | ||
const normalizedQuery = this.normalizeQuery(value); | ||
|
||
return this.typeahead.map((data: any[]) => { |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typeahead
has type any in the whole module. Adding type for this instance should be a separate issue.
src/typeahead/typeahead.directive.ts
Outdated
@@ -344,7 +344,15 @@ export class TypeaheadDirective implements OnInit, OnDestroy { | |||
this._subscriptions.push( | |||
this.keyUpEventEmitter | |||
.debounceTime(this.typeaheadWaitMs) | |||
.mergeMap(() => this.typeahead) | |||
.mergeMap((value: string) => { |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value: string
is not typing for typeahead
. This code is correct and doesn't break anything
1552274
to
69d2def
Compare
757f29b
to
02fb28d
Compare
valor-software#3725 Fix filtering incoming data after typeahead kicks-in Close valor-software#3725
46674e9
to
0664d8f
Compare
Tested. Issues were fixed by @IraErshova . Ready to merge |
@dmitry-zhemchugov has to be tested with real XHR as a source of data |
Fix filtering incoming data after typeahead kicks-in. Remove filtering functionality from demo code to ngx-bootstrap component's code.
Close #3725
PR Checklist
Before creating new PR, please take a look at checklist below to make sure that you've done everything that needs to be done before we can merge it.