SUPPORT-8638:fix from review
This commit is contained in:
parent
bc62fbd8dd
commit
c0ca6c413e
2 changed files with 11 additions and 15 deletions
|
|
@ -70,7 +70,5 @@ export class FilterRouteHandlerScript extends Behavior {
|
|||
if (this.filtersSubscription) {
|
||||
this.filtersSubscription.unsubscribe();
|
||||
}
|
||||
this.filterGroup.clearFilters()
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,21 +18,8 @@ export class TextClickHandlerScript extends Behavior {
|
|||
public route: string;
|
||||
private el: ElementRef;
|
||||
private router: Router;
|
||||
|
||||
private filterTransferService: FilterTransferService;
|
||||
|
||||
private onClickFunction = () => {
|
||||
const filterData: Record<string, any> = {};
|
||||
this.filters.forEach(filter => {
|
||||
if (filter.name && filter.value) {
|
||||
filterData[filter.name] = filter.value;
|
||||
}
|
||||
});
|
||||
|
||||
this.filterTransferService.setFilters(filterData);
|
||||
this.router.navigate([this.route]);
|
||||
};
|
||||
|
||||
constructor(pageId?: string, objectId?: string, injector?: Injector, interfaces?: any[]) {
|
||||
super(pageId, objectId, injector, interfaces);
|
||||
}
|
||||
|
|
@ -58,4 +45,15 @@ export class TextClickHandlerScript extends Behavior {
|
|||
this.el.nativeElement.removeEventListener('click', () => this.onClickFunction());
|
||||
}
|
||||
}
|
||||
|
||||
private onClickFunction() {
|
||||
const filterData: Record<string, any> = {};
|
||||
this.filters.forEach(filter => {
|
||||
if (filter.name && filter.value) {
|
||||
filterData[filter.name] = filter.value;
|
||||
}
|
||||
});
|
||||
this.filterTransferService.setFilters(filterData);
|
||||
this.router.navigate([this.route]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue