diff --git a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts b/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts
index 75dbfcfc82a..6c6a2f07ed9 100644
--- a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts
+++ b/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts
@@ -167,6 +167,8 @@ export class BrowseByMetadataPageComponent implements OnInit, OnDestroy {
if (typeof params.startsWith === 'string'){
this.startsWith = params.startsWith.trim();
+ } else {
+ this.startsWith = '';
}
if (isNotEmpty(this.value)) {
diff --git a/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.html b/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.html
index ff7efcc309d..3f59a347770 100644
--- a/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.html
+++ b/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.html
@@ -1,5 +1,5 @@
-
+
{{object.value}}
diff --git a/src/app/shared/starts-with/starts-with-abstract.component.ts b/src/app/shared/starts-with/starts-with-abstract.component.ts
index ad9c56c9702..72226c2af7b 100644
--- a/src/app/shared/starts-with/starts-with-abstract.component.ts
+++ b/src/app/shared/starts-with/starts-with-abstract.component.ts
@@ -80,11 +80,10 @@ export abstract class StartsWithAbstractComponent implements OnInit, OnDestroy {
this.startsWith = undefined;
}
if (resetPage) {
- this.paginationService.updateRoute(this.paginationId, {page: 1}, { startsWith: this.startsWith });
+ this.paginationService.updateRoute(this.paginationId, {page: 1}, { startsWith: this.startsWith }, undefined, { queryParamsHandling: '' });
} else {
this.router.navigate([], {
queryParams: Object.assign({ startsWith: this.startsWith }),
- queryParamsHandling: 'merge'
});
}
}
diff --git a/src/app/shared/starts-with/text/starts-with-text.component.spec.ts b/src/app/shared/starts-with/text/starts-with-text.component.spec.ts
index b717c72d76b..157dbc77d00 100644
--- a/src/app/shared/starts-with/text/starts-with-text.component.spec.ts
+++ b/src/app/shared/starts-with/text/starts-with-text.component.spec.ts
@@ -11,7 +11,7 @@ import { StartsWithTextComponent } from './starts-with-text.component';
import { PaginationService } from '../../../core/pagination/pagination.service';
import { PaginationServiceStub } from '../../testing/pagination-service.stub';
-describe('StartsWithTextComponent', () => {
+fdescribe('StartsWithTextComponent', () => {
let comp: StartsWithTextComponent;
let fixture: ComponentFixture;
let route: ActivatedRoute;
@@ -62,8 +62,8 @@ describe('StartsWithTextComponent', () => {
expect(comp.startsWith).toEqual(expectedValue);
});
- it('should add a startsWith query parameter', () => {
- expect(paginationService.updateRoute).toHaveBeenCalledWith('page-id', {page: 1}, {startsWith: expectedValue});
+ it('should add a startsWith query parameter and clear all others', () => {
+ expect(paginationService.updateRoute).toHaveBeenCalledWith('page-id', {page: 1}, {startsWith: expectedValue}, undefined, { queryParamsHandling: '' });
});
});