Skip to content

Commit 122f89e

Browse files
committed
Fix virtual scroll for target branch
Changes to the scrollable container made this behave poorly.
1 parent 970ddb4 commit 122f89e

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

apps/desktop/src/components/v3/VirtualList.svelte

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,16 +161,16 @@
161161
bind:viewport
162162
whenToShow={$userSettings.scrollbarVisibilityState}
163163
onscroll={handleScroll}
164-
{top}
165-
{bottom}
166164
bind:viewportHeight
167165
>
168-
{#each visible as chunk}
169-
<!-- Note: keying this #each would things much slower. -->
170-
<div class="list-row">
171-
{@render group?.(chunk.data)}
172-
</div>
173-
{/each}
166+
<div class="padded-contents" style:padding-top={top + 'px'} style:padding-bottom={bottom + 'px'}>
167+
{#each visible as chunk}
168+
<!-- Note: keying this #each would things much slower. -->
169+
<div class="list-row">
170+
{@render group?.(chunk.data)}
171+
</div>
172+
{/each}
173+
</div>
174174
</ScrollableContainer>
175175

176176
<style>
@@ -179,4 +179,8 @@
179179
overflow: hidden;
180180
background-color: var(--clr-bg-1);
181181
}
182+
.padded-contents {
183+
display: flex;
184+
flex-direction: column;
185+
}
182186
</style>

0 commit comments

Comments
 (0)