GitShow/developit/preact-scroll-viewport
developit

preact-scroll-viewport

Preact Component that renders homogeneous children only when visible

by developit
preactviewportvirtualvirtual-scroll
Star on GitHubForkWebsitenpm

JavaScript

123 stars11 forks2 contributorsQuiet · 7y agoSince 20160.2.0MIT

Meet the team

See all 2 on GitHub →
developit
developit9 contributions

Languages

View on GitHub →
JavaScript100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
42
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · 5 discussions · Last activity 7y ago
See all on GitHub →
dhamaniasad
Jumping with dynamically sized elementsOpenIssue

Hi! I'm using this plugin for a chat window, and I've got a list of elements (messages) that have all different sizes based on their content. When I scroll the list, the scroll position sometimes jumps around a few pixels. I've produced a repro here: https://jsfiddle.net/3Lhs6uyo/ Any idea on how to fix this?

dhamaniasad · 8y ago
jots
filteringOpenIssue

I would like to filter the data based on a search string. How do we reset the list of children to the new filtered array?

jots · 8y ago
kun-zhou
Possible perf improvements?OpenIssue

I was wondering why create the array of elements in the first place. Since we are already only rendering the children in the Viewport, why construct all the elements and stuff them in an array in the first place? This way we could save the computing power of reconstructing a huge list in the first place. Maybe we can pass down the data array directly to and only construct those elements that does actually end up in the Viewport and get rendered?

kun-zhou · 8y ago

Recent fixes

View closed PRs →
rosenbjerg
moved resized and scrolled into constructorMergedPR

moved resized and scrolled into constructor so that the ScrollViewport-component is usable without class property transformation. It should not increase the final size since the transformation creates the same result

rosenbjerg · 7y ago
dolebas
Avoid paint by using transform?ClosedIssue
dolebas · 8y ago
dlevs
Fix scroll events inside wrappers of fixed heightMergedPR

Hey, thanks for your work, loving preact. :) Noticed this component doesn't work for a list I have in a dialog box. I can reproduce the issue with this markup: The scroll event doesn't fire on window. Enabling the event capture phase fixes it.

dlevs · 9y ago
Structured data for AI agents

Repository: developit/preact-scroll-viewport. Description: Preact Component that renders homogeneous children only when visible Stars: 123, Forks: 11. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Homepage: https://jsfiddle.net/developit/t6qqnwn9/ Topics: preact, viewport, virtual, virtual-scroll. Latest release: 0.2.0 (8y ago). Open PRs: 0, open issues: 5. Last activity: 7y ago. Community health: 42%. Top contributors: developit.

·@ofershap

Replace github.com with gitshow.dev