{
+ const scroller = scrollerByTab.current[tab];
+ if (event.target !== scroller || scroller === null || scroller === undefined) return;
+ const top = scroller.scrollTop;
+ const previous = condensedByTab[tab] ?? false;
+ const foldHeight = foldRef.current?.scrollHeight ?? 0;
+ let next = previous;
+ if (previous) {
+ if (top < 4 && foldHeight > 0) next = false;
+ } else if (foldHeight > 0 && top > foldHeight + 32) {
+ const chromeDelta = foldHeight - (condensedRowRef.current?.scrollHeight ?? 0);
+ compensationRef.current = { tab, scroller, target: top - chromeDelta };
+ next = true;
+ }
+ if (next !== previous) setCondensedByTab({ ...condensedByTab, [tab]: next });
+ }}
+ >
{detailQuery.error && !detail ? (
) : (