Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Solid – Virtualizing with a container using max-height doesn't show all items when total height is below max-height

Offen
#869 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
typescript
Bereich
frontend

Rechercherichtung

Öffne zuerst die verlinkte CodeSandbox-Reproduktion und untersuche das Verhalten des Virtualizers, wenn fünf Elemente innerhalb eines Containers mit einer maximalen Höhe von 1000px auf 198px vergrößert werden. Verfolge die Solid-Integration anhand dieser Reproduktion und überprüfe, dass alle fünf Elemente zurückgegeben und gerendert werden, wenn ihre Gesamthöhe unter max-height liegt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Describe the bug

I have a dynamically sized virtual list whose container scroll element has a max-height style. This way, the container should shrink to the full list of items without needing a scrollbar if all of the items can fit below the max-height value.

However, this breaks in Solid. When the total size of the list approaches the max-height or exceeds it, only some of the items are shown.

See this example, where I have 5 items with an initial estimated size of 28px. Then I dynamically update the item size to be 198px. This adds up to a total height of 990px;. In this image, the container has a max-height of 1000px. Despite having enough room to fit everything, only 2 virtual items are returned by the virtualizer:
Image

See reproduction here: https://codesandbox.io/p/devbox/competent-tristan-7467c3

Your minimal, reproducible example

https://codesandbox.io/p/devbox/competent-tristan-7467c3

Steps to reproduce
  1. go to https://codesandbox.io/p/devbox/competent-tristan-7467c3
  2. See that not all items are drawn
Expected behavior

If the max-height exceeds the total height needed to show all items, all items should be shown.

How often does this bug happen?

Every time

Screenshots or Videos

Image

Platform

OSX Chrome

tanstack-virtual version

3.10.8

TypeScript version

No response

Additional context

No response

Terms & Code of Conduct
  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
Vorherrschende Sprache
TypeScript
Sterne
7.1k
Forks
478
Ø Merge
1 T. 3 Std.
Gemergte PRs (30 T.)
31

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TanStack/virtual

Alle Issues in TanStack/virtual

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.