diff --git a/apps/metadata-editor/src/app/records/records-list.component.ts b/apps/metadata-editor/src/app/records/records-list.component.ts index a0b6eb1042..f723ad2c53 100644 --- a/apps/metadata-editor/src/app/records/records-list.component.ts +++ b/apps/metadata-editor/src/app/records/records-list.component.ts @@ -1,5 +1,5 @@ import { CommonModule } from '@angular/common' -import { Component, Input } from '@angular/core' +import { Component, Input, OnInit } from '@angular/core' import { MatIconModule } from '@angular/material/icon' import { Router } from '@angular/router' import { CatalogRecord } from '@geonetwork-ui/common/domain/record' @@ -26,7 +26,7 @@ const includes = [ standalone: true, imports: [CommonModule, MatIconModule, UiSearchModule, UiElementsModule], }) -export class RecordsListComponent { +export class RecordsListComponent implements OnInit { @Input() title: string constructor( @@ -35,6 +35,9 @@ export class RecordsListComponent { public searchService: SearchService ) { this.searchFacade.setPageSize(15).setConfigRequestFields(includes) + } + + ngOnInit(): void { this.searchService.setSortBy(['desc', 'changeDate']) }