Skip to content

Why does VList have no as prop? #502

Closed Answered by inokawa
chloe463 asked this question in Q&A
Discussion options

You must be logged in to vote

You can use Virtualizer instead of VList. VList is just a wrapper of Virtualizer so you can build your own VList by yourself.

virtua/src/react/VList.tsx

Lines 108 to 121 in 63e9285

<div
ref={scrollRef}
{...attrs}
style={{
display: horizontal ? "inline-block" : "block",
[horizontal ? "overflowX" : "overflowY"]: "auto",
contain: "strict",
width: "100%",
height: "100%",
...style,
}}
>
{element}
</div>

Customizing the inner div seems to be an advanced usecase, probably ul, dl and table only need it. We think VList is for virtualization with minimal settings, to cover 80~90% of usecases, so we'd like to keep its…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@chloe463
Comment options

Answer selected by inokawa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants