Skip to content

Commit

Permalink
feat(filter): expose a method (#2600)
Browse files Browse the repository at this point in the history
  • Loading branch information
adisreyaj authored Jan 3, 2024
1 parent e9cbabb commit 7080b66
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,13 @@ export class FilterUrlService {
}

public setUrlFilters(filters: Filter[]): void {
this.navigationService.addQueryParametersToUrl({
this.navigationService.addQueryParametersToUrl(this.getQueryParamsObjectForFilters(filters));
}

public getQueryParamsObjectForFilters(filters: Filter[]): QueryParamObject {
return {
[FilterUrlService.FILTER_QUERY_PARAM]: filters.length === 0 ? undefined : filters.map(f => f.urlString),
});
};
}

public setUrlGroupBy(groupBy?: string[]): void {
Expand Down

0 comments on commit 7080b66

Please sign in to comment.