Blazing-fast performance with 15,000 options using virtual scrolling and real-time metrics
🌐 client — runs in the browser (element JS API) 🖥️ server — LiveView round-trip
enable_virtual_scroll={true} · virtual_scroll_threshold={100} · option_height={50} · virtual_scroll_buffer={10}
This demo tests the component with 15,000 randomly generated options to evaluate performance under heavy load — and lets you jump anywhere in that list with the scroll-to API.
In virtual mode scrollToIndex / scrollToValue scroll by
fixed-height index math — the target row need not be rendered, so
jumping to item #14,999 in this 15,000-row list is instant. Pair with open()
for an "open + jump" gesture. Default alignment is start (target at the top);
pass { block: 'center' } to center it. The buttons below drive the same picker.
scrollTop and which rows landed in view.
el.open();
el.scrollToIndex(14999); // instant — row 14,999 isn't rendered yet
el.scrollToValue(12345); // resolves value → index
el.scrollToIndex(7500, { block: 'center' });
badge_height={50} sizes popover rows · option_height={70} · enable_virtual_scroll={true}
Testing custom rendering callbacks with 150 items to trigger virtual scrolling in the selected items popover (threshold: 100).
renderSelectionBadgeContentCallback
and getSelectionBadgeClassCallback for rich badge styling.
(pick an option anywhere on this page)