Skip to content

Commit

Permalink
Merge pull request #2768 from 4Science/DURACOM-224
Browse files Browse the repository at this point in the history
Fix infinite scroll
  • Loading branch information
tdonohue authored Apr 19, 2024
2 parents 489d8fd + 2afa473 commit e96ca2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,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,
Expand Down

0 comments on commit e96ca2f

Please sign in to comment.