What's new in Grid v7.1.1
List virtualization
The List widget now supports virtualization of its items using the browser's IntersectionObserver
API. When enabled, list items are only rendered when they scroll into view, improving performance for lists with complex
item templates.
Configure the virtualize config to enable this feature:
// Always virtualize, regardless of item count
const list = new List({
virtualize : true,
store : {
data : largeDataset
}
});
// Or virtualize only when item count exceeds a threshold
const list2 = new List({
virtualize : 1000,
store : {
data : largeDataset
}
});
The virtualize config accepts the following values:
falseornull- Virtualization disabled (default)true- Always virtualize, regardless of item count{Number}- Virtualize only when item count exceeds this threshold (e.g.,1000)
When virtualized, items outside the viewport are rendered as lightweight placeholder elements. As items scroll into
view, the IntersectionObserver triggers rendering of the full item content using the configured
itemTpl.
Note that virtualization adds some overhead, so it's most beneficial for lists with complex item templates and large datasets. For simple lists, the standard rendering approach is typically more efficient.