Skip to content
Snippets Groups Projects
Commit cd68c31e authored by Antonin COQUET's avatar Antonin COQUET
Browse files

fix: send query string to structure details components

parent 8e9f5979
No related branches found
No related tags found
3 merge requests!178release V1.10.0,!135Dev,!122Feat/structure query param
...@@ -45,11 +45,17 @@ export class CardComponent implements OnInit { ...@@ -45,11 +45,17 @@ export class CardComponent implements OnInit {
public cardClicked(): void { public cardClicked(): void {
this.showDetails.emit(this.structure); this.showDetails.emit(this.structure);
const queryString = this.route.snapshot.queryParamMap.get('search');
this.router.navigate([], { this.router.navigate([], {
relativeTo: this.route, relativeTo: this.route,
queryParams: { queryParams: queryString
id: this.structure._id, ? {
}, id: this.structure._id,
search: queryString,
}
: {
id: this.structure._id,
},
}); });
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<app-card <app-card
*ngFor="let structure of structuresListChunked" *ngFor="let structure of structuresListChunked"
[structure]="structure" [structure]="structure"
(showDetails)="showDetails($event)" (showDetails)="showDetails($event, filters)"
(hover)="handleCardHover($event)" (hover)="handleCardHover($event)"
></app-card> ></app-card>
<p *ngIf="structureList && structureList.length <= 0">Il n'y a aucune réponse correspondant à votre recherche</p> <p *ngIf="structureList && structureList.length <= 0">Il n'y a aucune réponse correspondant à votre recherche</p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment