
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@danielgindi/virtual-list-helper
Advanced tools
A collection of dom utilities. So you can work natively with the dom without dom frameworks.
A full featured dom virtual list
The default exported class is VirtualListHelper
, which does all the magic.
I really hope to put in an example here soon. PRs are welcome.
Property | Type | Default | Meaning |
---|---|---|---|
list | Element | the main element to operate inside of | |
hookScrollEvent | boolean | true | automatically hook scroll event as needed |
count | number | 0 | the item count |
virtual | boolean | true | is virtual mode on? |
estimatedItemHeight | number | 20 | estimated item height |
buffer | number | 5 | the amount of buffer items to keep on each end of the list |
itemHeightEstimatorFn | ItemHeightEstimatorFunction | an optional function for providing item height estimations | |
itemElementCreatorFn | ItemElementCreatorFunction | an optional function for providing fresh item elements (default creates <li /> s) | |
onItemRender | ItemRenderFunction | a function for rendering element content based on item index | |
onItemUnrender | ItemUnrenderFunction | a function for freeing resources in an item element |
function(index: number):(number|undefined)
Argument | Type | Meaning |
---|---|---|
index | number | index of the item to get an estimate for |
return | number , undefined | the estimation, or undefined to use default estimate |
function():Element
<li>
element.Argument | Type | Meaning |
---|---|---|
return | Element | the element to serve as the item |
function(itemEl: Element, index: number)
ItemUnrenderFunction
.Argument | Type | Meaning |
---|---|---|
itemEl | Element | the element in which to render the item contents |
index | number | the index of the item |
function(itemEl: Element)
ItemRenderFunction
.Argument | Type | Meaning |
---|---|---|
itemEl | Element | the element in which to un-render the item contents |
This class' api is pretty much self explanatory, but I'll try to find the time to document it properly and add examples.
If you want to help, you could:
All the code here is under MIT license. Which means you could do virtually anything with the code. I will appreciate it very much if you keep an attribution where appropriate.
The MIT License (MIT)
Copyright (c) 2013 Daniel Cohen Gindi (danielgindi@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
FAQs
A collection of dom utilities. So you can work natively with the dom without dom frameworks.
The npm package @danielgindi/virtual-list-helper receives a total of 31 weekly downloads. As such, @danielgindi/virtual-list-helper popularity was classified as not popular.
We found that @danielgindi/virtual-list-helper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.