Skip to content

Commit ce10ffe

Browse files
committed
133535: resolve merge conflicts
1 parent 2d70268 commit ce10ffe

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed

src/app/shared/search/search-filters/search-filter/search-facet-filter-wrapper/search-facet-filter-wrapper.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ export class SearchFacetFilterWrapperComponent extends AbstractComponentLoaderCo
5151

5252
protected inputNamesDependentForComponent: (keyof this & string)[] = [
5353
'filterConfig',
54+
'retainScrollPosition',
5455
];
5556

5657
protected inputNames: (keyof this & string)[] = [
5758
'filterConfig',
5859
'inPlaceSearch',
5960
'refreshFilters',
61+
'retainScrollPosition',
6062
'scope',
6163
];
6264

src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ import {
3232
} from 'rxjs/operators';
3333

3434
import { RemoteDataBuildService } from '../../../../../core/cache/builders/remote-data-build.service';
35-
import {
36-
PaginationService,
37-
RETAIN_SCROLL_POSITION,
38-
} from '../../../../../core/pagination/pagination.service';
35+
import { PaginationService } from '../../../../../core/pagination/pagination.service';
3936
import { getFirstSucceededRemoteDataPayload } from '../../../../../core/shared/operators';
4037
import { SearchService } from '../../../../../core/shared/search/search.service';
4138
import { SearchConfigurationService } from '../../../../../core/shared/search/search-configuration.service';
@@ -93,6 +90,11 @@ export class SearchFacetFilterComponent implements OnInit, OnDestroy {
9390
*/
9491
@Input() scope: string;
9592

93+
/**
94+
* Should scroll to the pagination component after updating the route instead of the top of the page
95+
*/
96+
@Input() retainScrollPosition = false;
97+
9698
/**
9799
* Emits an array of pages with values found for this facet
98100
*/
@@ -155,7 +157,6 @@ export class SearchFacetFilterComponent implements OnInit, OnDestroy {
155157
protected rdbs: RemoteDataBuildService,
156158
protected router: Router,
157159
@Inject(SEARCH_CONFIG_SERVICE) public searchConfigService: SearchConfigurationService,
158-
@Inject(RETAIN_SCROLL_POSITION) protected retainScrollPosition: boolean,
159160
) {
160161
}
161162

src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ import {
3535
} from '../../../../../../config/app-config.interface';
3636
import { FilterVocabularyConfig } from '../../../../../../config/filter-vocabulary-config';
3737
import { RemoteDataBuildService } from '../../../../../core/cache/builders/remote-data-build.service';
38-
import {
39-
PaginationService,
40-
RETAIN_SCROLL_POSITION,
41-
} from '../../../../../core/pagination/pagination.service';
38+
import { PaginationService } from '../../../../../core/pagination/pagination.service';
4239
import { PageInfo } from '../../../../../core/shared/page-info.model';
4340
import { SearchService } from '../../../../../core/shared/search/search.service';
4441
import { SearchConfigurationService } from '../../../../../core/shared/search/search-configuration.service';
@@ -88,7 +85,6 @@ export class SearchHierarchyFilterComponent extends SearchFacetFilterComponent i
8885
protected vocabularyService: VocabularyService,
8986
@Inject(APP_CONFIG) protected appConfig: AppConfig,
9087
@Inject(SEARCH_CONFIG_SERVICE) public searchConfigService: SearchConfigurationService,
91-
@Inject(RETAIN_SCROLL_POSITION) protected retainScrollPosition: boolean,
9288
) {
9389
super(
9490
searchService,
@@ -97,7 +93,6 @@ export class SearchHierarchyFilterComponent extends SearchFacetFilterComponent i
9793
rdbs,
9894
router,
9995
searchConfigService,
100-
retainScrollPosition,
10196
);
10297
}
10398

src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ import {
2323
import { yearFromString } from 'src/app/shared/date.util';
2424

2525
import { RemoteDataBuildService } from '../../../../../core/cache/builders/remote-data-build.service';
26-
import {
27-
PaginationService,
28-
RETAIN_SCROLL_POSITION,
29-
} from '../../../../../core/pagination/pagination.service';
26+
import { PaginationService } from '../../../../../core/pagination/pagination.service';
3027
import { RouteService } from '../../../../../core/services/route.service';
3128
import { SearchService } from '../../../../../core/shared/search/search.service';
3229
import { SearchConfigurationService } from '../../../../../core/shared/search/search-configuration.service';
@@ -120,7 +117,6 @@ export class SearchRangeFilterComponent extends SearchFacetFilterComponent imple
120117
private translateService: TranslateService,
121118
@Inject(SEARCH_CONFIG_SERVICE) public searchConfigService: SearchConfigurationService,
122119
@Inject(PLATFORM_ID) private platformId: any,
123-
@Inject(RETAIN_SCROLL_POSITION) protected retainScrollPosition: boolean,
124120
) {
125121
super(
126122
searchService,
@@ -129,7 +125,6 @@ export class SearchRangeFilterComponent extends SearchFacetFilterComponent imple
129125
rdbs,
130126
router,
131127
searchConfigService,
132-
retainScrollPosition,
133128
);
134129
}
135130

src/app/shared/search/search-labels/search-label-loader/search-label-loader.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,19 @@ export class SearchLabelLoaderComponent extends AbstractComponentLoaderComponent
2323

2424
@Input() inPlaceSearch: boolean;
2525

26+
@Input() retainScrollPosition: boolean;
27+
2628
@Input() appliedFilter: AppliedFilter;
2729

2830
protected inputNamesDependentForComponent: (keyof this & string)[] = [
2931
'appliedFilter',
32+
'retainScrollPosition',
3033
];
3134

3235
protected inputNames: (keyof this & string)[] = [
3336
'inPlaceSearch',
3437
'appliedFilter',
38+
'retainScrollPosition',
3539
];
3640

3741
public getComponent(): GenericConstructor<Component> {

0 commit comments

Comments
 (0)