Commit 325b52f6 authored by Marcelo Rivera's avatar Marcelo Rivera

(fix): brought back search, but remove parameters when clearing search

1 merge request!507WIP: (feat): Minds Pro (development branch) - Release 3
Pipeline #79213951 failed with stages
in 6 minutes and 49 seconds
......@@ -20,6 +20,9 @@
type="text"
(keyup.enter)="search()"
>
<ng-container *ngIf="query">
<i class="material-icons clear" (click)="clearSearch()">close</i>
</ng-container>
<label class="mdl-textfield__label" for="search"></label>
</div>
</div>
......
......@@ -11,7 +11,7 @@ import {
OnInit,
ViewChild
} from '@angular/core';
import { ActivatedRoute, NavigationEnd, Router } from "@angular/router";
import { ActivatedRoute, Router } from "@angular/router";
import { Session } from "../../../services/session";
import { Subscription } from "rxjs";
import { MindsUser } from "../../../interfaces/entities";
......@@ -238,7 +238,10 @@ export class ProChannelComponent implements OnInit, AfterViewInit, OnDestroy {
wire() {
this.modalService.create(WireCreatorComponent,
this.channelService.currentChannel,
{ onComplete: () => {} }
{
onComplete: () => {
}
}
).present();
}
......@@ -274,6 +277,12 @@ export class ProChannelComponent implements OnInit, AfterViewInit, OnDestroy {
return this.router.navigate(this.channelService.getRouterLink('all', { query: this.query }));
}
clearSearch() {
this.query = '';
const cleanUrl = this.router.url.split(';')[0];
this.router.navigate([cleanUrl]);
}
detectChanges() {
this.cd.markForCheck();
this.cd.detectChanges();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment