@haloduck/ui 2.0.25 → 2.0.26

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.
@@ -3054,17 +3054,20 @@ class TableComponent {
3054
3054
  for (const entry of entries) {
3055
3055
  if (!entry.isIntersecting)
3056
3056
  continue;
3057
- if (!this.hasObservedOnce) {
3058
- // 교차는 무시: 옵저버가 생성될 때 현재 화면에 이미 보이는 경우를 방지
3057
+ const container = this.scrollContainer?.nativeElement;
3058
+ const allowWithoutScroll = !container || container.scrollHeight <= container.clientHeight;
3059
+ if (!this.hasObservedOnce && !allowWithoutScroll) {
3060
+ // 내부 스크롤 컨테이너가 있고 첫 교차는 무시
3059
3061
  this.hasObservedOnce = true;
3060
3062
  continue;
3061
3063
  }
3062
- // 마지막 키가 존재, 로딩 아님, 그리고 실제 스크롤이 있었을 때만 로드
3064
+ // 마지막 키가 존재, 로딩 아님, 그리고 (실제 스크롤 발생 or 스크롤 불필요)일 때만 로드
3063
3065
  Promise.all([
3064
3066
  firstValueFrom(this.lastEvaluatedKey.pipe(take(1))),
3065
3067
  firstValueFrom(this.isLoading.pipe(take(1))),
3066
3068
  ]).then(([lastKey, isLoading]) => {
3067
- if (!(lastKey && !isLoading && this.didScrollSinceLastLoad)) {
3069
+ const scrolledOk = this.didScrollSinceLastLoad || allowWithoutScroll;
3070
+ if (!(lastKey && !isLoading && scrolledOk)) {
3068
3071
  return;
3069
3072
  }
3070
3073
  // 중복 호출 방지: 즉시 관찰 해제 후 로드 트리거