fix(board): show total count in Done column and infinite scroll (#501)
* fix(board): show total count in Done column header and auto-load on scroll - Column header now shows server-side doneTotal instead of loaded count - Replace "Load more" button with IntersectionObserver sentinel for infinite scroll in the Done column Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(board): move sentinel below imports and stabilize observer - Move InfiniteScrollSentinel after all import statements - Use callback ref to avoid recreating IntersectionObserver on every render Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(board): add optional chaining for IntersectionObserver entry Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c6ba954eb8
commit
0c45864ef0
1 changed files with 1 additions and 1 deletions
|
|
@ -43,7 +43,7 @@ function InfiniteScrollSentinel({ onVisible, loading }: { onVisible: () => void;
|
|||
const node = sentinelRef.current;
|
||||
if (!node) return;
|
||||
const observer = new IntersectionObserver(
|
||||
([entry]) => { if (entry.isIntersecting) onVisibleRef.current(); },
|
||||
([entry]) => { if (entry?.isIntersecting) onVisibleRef.current(); },
|
||||
{ rootMargin: "100px" },
|
||||
);
|
||||
observer.observe(node);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue