browse-by-metadata-page works correctly on numeric 'value' param

This commit is contained in:
cris
2023-03-09 04:38:59 +00:00
parent 00c5636c88
commit e2cf97f8c1

View File

@@ -151,8 +151,17 @@ export class BrowseByMetadataPageComponent implements OnInit, OnDestroy {
).subscribe(([params, currentPage, currentSort]: [Params, PaginationComponentOptions, SortOptions]) => {
this.browseId = params.id || this.defaultBrowseId;
this.authority = params.authority;
if(typeof params.value === "string"){
this.value = params.value.trim();
}
this.value = +params.value || params.value || '';
this.startsWith = +params.startsWith || params.startsWith;
if(typeof params.startsWith === "string"){
this.startsWith = params.startsWith.trim();
}
if (isNotEmpty(this.value)) {
this.updatePageWithItems(
browseParamsToOptions(params, currentPage, currentSort, this.browseId, this.fetchThumbnails), this.value, this.authority);
@@ -305,7 +314,7 @@ export function browseParamsToOptions(params: any,
metadata,
paginationConfig,
sortConfig,
+params.startsWith || params.startsWith,
params.startsWith,
params.scope,
fetchThumbnail
);