Configure a virtual list with settings for size estimation, buffering, and visibility during measurement.
You can combine the following setters with the pipe operator:
VirtualList.Config.default
|> VirtualList.Config.setInitialHeight 650
|> VirtualList.Config.setBuffer 10Sets the ID of the list container in the DOM.
Uses the default ID if an empty string is provided: "virtual-list"
Defines the estimated list height before measurement.
Uses the default if negative: 500
Sets the estimated item height before measurement.
Uses the default if negative: Default: 26
Controls whether the list remains visible during measurement.
If True, it may cause spacing issues.
Default: False
Defines how many extra items are rendered outside the visible range for smoother scrolling.
Default: 5
Enables dynamic buffer sizing based on scroll speed.
Default: True
You will probably have no need to access these values directly.
Returns the list’s estimated height before measurement.
Returns the estimated item height before measurement.
Returns whether the list remains visible during measurement, which may affect layout.
Returns whether buffer sizing is dynamic based on scroll speed.
Defines the configuration for a virtual list, including estimated item heights, buffer size, and visibility settings during measurement.
Start with default and customize it using setter functions: