mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
[DURACOM-224] fix infinite scroll
(cherry picked from commit 2afa473cfb
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
4aa3158f33
commit
fde0ebf872
@@ -7,12 +7,12 @@
|
||||
[formControl]="input" ngbAutofocus (keyup.enter)="selectSingleResult()">
|
||||
</div>
|
||||
<div class="dropdown-divider"></div>
|
||||
<div class="scrollable-menu list-group">
|
||||
<div id="scrollable-menu-dso-selector-{{randomSeed}}" class="scrollable-menu list-group">
|
||||
<div
|
||||
infiniteScroll
|
||||
[infiniteScrollDistance]="1"
|
||||
[infiniteScrollThrottle]="0"
|
||||
[infiniteScrollContainer]="'.scrollable-menu'"
|
||||
[infiniteScrollContainer]="'#scrollable-menu-dso-selector-' + randomSeed"
|
||||
[fromRoot]="true"
|
||||
(scrolled)="onScrollDown()">
|
||||
<ng-container *ngIf="listEntries$ | async">
|
||||
|
@@ -141,6 +141,11 @@ export class DSOSelectorComponent implements OnInit, OnDestroy {
|
||||
*/
|
||||
public subs: Subscription[] = [];
|
||||
|
||||
/**
|
||||
* Random seed of 4 characters to avoid duplicate ids
|
||||
*/
|
||||
randomSeed: string = Math.random().toString(36).substring(2, 6);
|
||||
|
||||
constructor(
|
||||
protected searchService: SearchService,
|
||||
protected notifcationsService: NotificationsService,
|
||||
|
Reference in New Issue
Block a user