fix(console): infinite scrolling for org context (#7965)

* add scroll directive, iterative loading

* sorting column

* fix: filter

* batch of 100, max height 350px

* cleanup
This commit is contained in:
Max Peintner
2024-05-17 17:28:29 +00:00
committed by GitHub
parent 6858ed7b21
commit f482231f79
8 changed files with 107 additions and 47 deletions
@@ -1,6 +1,7 @@
import { Directive, ElementRef, EventEmitter, HostListener, Output } from '@angular/core';
@Directive({
standalone: true,
selector: '[cnslScrollable]',
})
export class ScrollableDirective {
@@ -15,7 +16,6 @@ export class ScrollableDirective {
const top = event.target.scrollTop;
const height = this.el.nativeElement.scrollHeight;
const offset = this.el.nativeElement.offsetHeight;
// emit bottom event
if (top > height - offset - 1) {
this.scrollPosition.emit('bottom');
@@ -1,11 +0,0 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { ScrollableDirective } from './scrollable.directive';
@NgModule({
declarations: [ScrollableDirective],
imports: [CommonModule],
exports: [ScrollableDirective],
})
export class ScrollableModule {}