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
Advanced search panel #5
Conversation
7d96c8c
to
4027327
Compare
4027327
to
79f0428
Compare
} | ||
|
||
ngOnDestroy(): void { | ||
this.formSubscription?.unsubscribe(); |
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.
Don't need to check undefined
. Just this.formSubscription.unsubscribe()
.
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.
ok :)
.pipe( | ||
startWith({}), | ||
switchMap(() => { | ||
switchMap((value) => { |
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.
Seems you don't need value
here.
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.
Agree. :)
<mat-label>Filter</mat-label> | ||
<input matInput [ngrxFormControlState]="(form$ | async).controls.query" placeholder="Filter"/> | ||
</mat-form-field> | ||
<br/> |
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.
Avoid using <br>
.
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.
ok, I'll delete it.
.pipe( | ||
startWith({}), | ||
switchMap(() => { | ||
switchMap((value) => { | ||
this.isLoadingResults = true; |
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.
You can use tap
operator for this.isLoadingResults
.
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.
done
.pipe( | ||
startWith({}), | ||
switchMap(() => { | ||
switchMap((value) => { | ||
this.isLoadingResults = true; | ||
const queryParams: QueryParams = { |
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.
I'd move queryParams
preparation for resourceService
into map
.
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.
done
|
||
resources: EsHits<Resource>[] = []; | ||
resources: Observable<EsHits<Resource>[]>; |
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.
$
suffix is used to indicate observable.
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.
done
No description provided.