Skip to content
Snippets Groups Projects
Commit 5f111b6e authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FEAT #12091 TIME 0:25 fix keep checkbox checked when navigating link search

parent 4c179c67
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
title="{{lang.selectAllResInBasket}}" (change)="toggleAllRes($event)"></mat-checkbox> title="{{lang.selectAllResInBasket}}" (change)="toggleAllRes($event)"></mat-checkbox>
</mat-header-cell> </mat-header-cell>
<mat-cell *matCellDef="let row" style="width: 70px;flex: initial;"> <mat-cell *matCellDef="let row" style="width: 70px;flex: initial;">
<mat-checkbox color="primary" [checked]="row.checked" (change)="toggleRes($event,row)" <mat-checkbox color="primary" [checked]="this.selectedRes.indexOf(row.resId) !== -1" (change)="toggleRes($event,row)"
(click)="$event.stopPropagation();" [disabled]="row.resId == currentResId"> (click)="$event.stopPropagation();" [disabled]="row.resId == currentResId">
</mat-checkbox> </mat-checkbox>
</mat-cell> </mat-cell>
......
...@@ -56,6 +56,7 @@ export class SearchAdvListComponent implements OnInit { ...@@ -56,6 +56,7 @@ export class SearchAdvListComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.loading = true; this.loading = true;
this.initResourceList(); this.initResourceList();
this.selectedRes = [];
} }
initResourceList() { initResourceList() {
...@@ -76,7 +77,6 @@ export class SearchAdvListComponent implements OnInit { ...@@ -76,7 +77,6 @@ export class SearchAdvListComponent implements OnInit {
this.sort.active, this.sort.direction, this.paginator.pageIndex, this.routeUrl, this.search); this.sort.active, this.sort.direction, this.paginator.pageIndex, this.routeUrl, this.search);
}), }),
map(data => { map(data => {
this.selectedRes = [];
this.isLoadingResults = false; this.isLoadingResults = false;
data = this.processPostData(data); data = this.processPostData(data);
this.resultsLength = data.count; this.resultsLength = data.count;
......
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