@haloduck/ui 2.0.27 → 2.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3060,20 +3060,17 @@ class TableComponent {
3060
3060
  for (const entry of entries) {
3061
3061
  if (!entry.isIntersecting)
3062
3062
  continue;
3063
- const container = this.scrollContainer?.nativeElement;
3064
- const allowWithoutScroll = !container || container.scrollHeight <= container.clientHeight;
3065
- if (!this.hasObservedOnce && !allowWithoutScroll) {
3066
- // 내부 스크롤 컨테이너가 있고 첫 교차는 무시
3063
+ // 교차는 무시하여 초기 붙자마자의 즉시 트리거 방지
3064
+ if (!this.hasObservedOnce) {
3067
3065
  this.hasObservedOnce = true;
3068
3066
  continue;
3069
3067
  }
3070
- // 마지막 키가 존재, 로딩 아님, 그리고 (실제 스크롤 발생 or 스크롤 불필요)일 때만 로드
3068
+ // 마지막 키가 존재, 로딩 아님, 그리고 실제 스크롤이 있었을 때만 로드
3071
3069
  Promise.all([
3072
3070
  firstValueFrom(this.lastEvaluatedKey.pipe(take(1))),
3073
3071
  firstValueFrom(this.isLoading.pipe(take(1))),
3074
3072
  ]).then(([lastKey, isLoading]) => {
3075
- const scrolledOk = this.didScrollSinceLastLoad || allowWithoutScroll;
3076
- if (!(lastKey && !isLoading && scrolledOk)) {
3073
+ if (!(lastKey && !isLoading && this.didScrollSinceLastLoad)) {
3077
3074
  return;
3078
3075
  }
3079
3076
  // 중복 호출 방지: 즉시 관찰 해제 후 로드 트리거