Skip to content

Commit

Permalink
fix(datahub): custom filter btn fix for sorting param
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoinier committed Sep 14, 2023
1 parent 0ccb939 commit 9a36960
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions apps/datahub/src/app/home/home-header/home-header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import {
import { SortByEnum, SortByField } from '@geonetwork-ui/common/domain/search'
import { map } from 'rxjs/operators'
import { ROUTER_ROUTE_NEWS } from '../../router/constants'
import { lastValueFrom } from 'rxjs'
import { firstValueFrom, lastValueFrom } from 'rxjs'
import { CatalogRecord } from '@geonetwork-ui/common/domain/record'
import { sortByFromString } from '@geonetwork-ui/util/shared'
import { sortByToString } from '@geonetwork-ui/util/shared'

marker('datahub.header.myfavorites')
marker('datahub.header.lastRecords')
Expand Down Expand Up @@ -84,9 +84,7 @@ export class HomeHeaderComponent {
customSearchParameters.filters
)
)
this.searchService.setSortAndFilters(
searchFilters,
sortByFromString(customSearchParameters.sort)
)
const sortBy = await firstValueFrom(this.searchFacade.sortBy$)
this.searchService.setSortAndFilters(searchFilters, sortBy)
}
}

0 comments on commit 9a36960

Please sign in to comment.