Skip to content

Commit

Permalink
[DURACOM-224] fix infinite scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Barbasso committed Jan 23, 2024
1 parent a59f371 commit 2afa473
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 @@ -6,12 +6,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 @@ -136,6 +136,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 2afa473

Please sign in to comment.