Skip to content

Commit

Permalink
fix: reset search location btn
Browse files Browse the repository at this point in the history
  • Loading branch information
69pmb committed Oct 4, 2024
1 parent adecf4d commit 8d710cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,14 @@ export class DashboardForecastComponent implements OnInit, OnDestroy {
}

navigate(location: string): void {
this.router
.navigate(['.'], {
queryParams: {location},
relativeTo: this.activatedRoute,
})
.catch(err => console.error(err));
if (location) {
this.router
.navigate(['.'], {
queryParams: {location},
relativeTo: this.activatedRoute,
})
.catch(err => console.error(err));
}
}

trackByFn: TrackByFunction<ForecastDay> = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@ <h1>{{ 'global.geolocation.in_progress' | translate }}</h1>
mat-icon-button
type="button"
matIconSuffix
(click)="reset(); $event.stopPropagation()"
>
<fa-icon
size="2x"
[icon]="faTimes"
(click)="$event.stopPropagation(); reset()"
></fa-icon>
<fa-icon size="2x" [icon]="faTimes"></fa-icon>
</button>
</mat-form-field>
<mat-autocomplete
Expand Down

0 comments on commit 8d710cc

Please sign in to comment.