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

Advanced search panel #5

Merged
merged 5 commits into from Oct 31, 2020
Merged

Advanced search panel #5

merged 5 commits into from Oct 31, 2020

Conversation

Max-Levitskiy
Copy link
Owner

No description provided.

@Max-Levitskiy Max-Levitskiy force-pushed the search-panel branch 2 times, most recently from 7d96c8c to 4027327 Compare October 22, 2020 19:32
}

ngOnDestroy(): void {
this.formSubscription?.unsubscribe();

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().

Copy link
Owner Author

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) => {

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.

Copy link
Owner Author

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/>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using <br>.

Copy link
Owner Author

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;

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.

Copy link
Owner Author

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 = {
Copy link

@helloilya helloilya Oct 24, 2020

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.

Copy link
Owner Author

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>[]>;

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.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@Max-Levitskiy Max-Levitskiy merged commit cce7ff8 into master Oct 31, 2020
@Max-Levitskiy Max-Levitskiy deleted the search-panel branch October 31, 2020 12:04
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

2 participants