-
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): fix typeahead's breaking if typeahead property receives NULL #4957
Conversation
Codecov Report
@@ Coverage Diff @@
## development #4957 +/- ##
==============================================
+ Coverage 74.79% 74.8% +0.01%
==============================================
Files 277 277
Lines 8434 8434
Branches 1602 1603 +1
==============================================
+ Hits 6308 6309 +1
+ Misses 1683 1679 -4
- Partials 443 446 +3
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## development #4957 +/- ##
===============================================
+ Coverage 74.79% 74.83% +0.04%
===============================================
Files 277 277
Lines 8434 8436 +2
Branches 1602 1603 +1
===============================================
+ Hits 6308 6313 +5
+ Misses 1678 1677 -1
+ Partials 448 446 -2
Continue to review full report at Codecov.
|
src/typeahead/typeahead.directive.ts
Outdated
@@ -448,6 +448,9 @@ export class TypeaheadDirective implements OnInit, OnDestroy { | |||
} | |||
|
|||
protected finalizeAsyncCall(matches: TypeaheadMatch[]): void { | |||
if (!matches) { | |||
return; |
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.
return; | |
matches = []; |
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.
fixed in other way
@@ -78,6 +78,9 @@ export class DemoTypeaheadAsyncComponent { | |||
|
|||
getStatesAsObservable(token: string): Observable<any> { | |||
const query = new RegExp(token, 'i'); | |||
if (!this.statesComplex) { |
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.
remove after testing
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.
removed
…es NULL (valor-software#4957) * fix(typeahead): Typeahead breaks if typeahead property receives NULL * fix(typeahead): restore typehead-directive file * feat(typeahead): add tests for new func * fix(typeahead): rework existing pr Fixes valor-software#4417
…es NULL (valor-software#4957) * fix(typeahead): Typeahead breaks if typeahead property receives NULL * fix(typeahead): restore typehead-directive file * feat(typeahead): add tests for new func * fix(typeahead): rework existing pr Fixes valor-software#4417
Closes to #4417