mirror of
https://github.com/immich-app/immich.git
synced 2025-11-17 03:53:16 -05:00
fix: regression - search results not visible until scroll (#23321)
This commit is contained in:
parent
52596255c8
commit
8d25f81bec
@ -96,18 +96,18 @@
|
||||
|
||||
let shiftKeyIsDown = $state(false);
|
||||
let lastAssetMouseEvent: TimelineAsset | null = $state(null);
|
||||
let slidingWindow = $state({ top: 0, bottom: 0 });
|
||||
|
||||
const updateSlidingWindow = () => {
|
||||
const v = $state.snapshot(viewport);
|
||||
const top = (document.scrollingElement?.scrollTop || 0) - slidingWindowOffset;
|
||||
const bottom = top + v.height;
|
||||
const w = {
|
||||
let scrollTop = $state(0);
|
||||
let slidingWindow = $derived.by(() => {
|
||||
const top = (scrollTop || 0) - slidingWindowOffset;
|
||||
const bottom = top + viewport.height;
|
||||
return {
|
||||
top,
|
||||
bottom,
|
||||
};
|
||||
slidingWindow = w;
|
||||
};
|
||||
});
|
||||
|
||||
const updateSlidingWindow = () => (scrollTop = document.scrollingElement?.scrollTop ?? 0);
|
||||
|
||||
const debouncedOnIntersected = debounce(() => onIntersected?.(), 750, { maxWait: 100, leading: true });
|
||||
|
||||
let lastIntersectedHeight = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user