mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
browse-by-metadata-page works correctly on numeric 'value' param
This commit is contained in:
@@ -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
|
||||
);
|
||||
|
Reference in New Issue
Block a user