Skip to content

Height calculation in grid layoutΒ #215

@michael-r-elp

Description

@michael-r-elp

First of all, great project you have here so far.

Now to my issue, I'm trying to render items in a grid see below

<SvelteVirtualList items={imageItems} contentClass="flex flex-1 flex-col gap-4 p-4" itemsClass="grid auto-rows-min gap-4 md:grid-cols-2 xl:grid-cols-3">
	{#snippet renderItem(image)}
            ...
	{/snippet}
</SvelteVirtualList>

But this has the unfortunate side effect of it calculating the wrong height, do you know if there's a good way of showing items in a grid, ideally with dynamic columns?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementApply to new features or improvements to existing featuresmore info neededMore information is needed to complete this task!

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions