Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
view-list
Advanced tools
Readme
An infinite scrolling list view element built on a virtual DOM.
View a live example displaying 200k rows: http://shama.github.io/view-list
Render the ViewList using virtual-dom:
var ViewList = require('view-list')
// Create an instance of our view list in document.body
var viewlist = new ViewList({
appendTo: document.body
})
// Create some data to add to the list
var data = ['one', 'two', 'three']
// Render the data
viewlist.render(data)
// Listen for scroll events coming up
viewlist.addEventListener('scroll', function (element) {
console.log('List was scrolled to ' + element.scrollTop)
})
// Every second, append a new row
var i = 0
setInterval(function() {
data.push('row ' + i++)
viewlist.render(data)
}, 1000)
var list = new ViewList(params)
params
can be (in addition to the virtual-dom
parameters):
tagName
: The tag to use. Default 'ul'
.
childTagName
: The tag to use for child elements. Default 'li'
.
className
: The classes to use on main element. Default 'view-list'
.
topClassName
: The classes to use on top element. Default '.top'
.
bottomClassName
: The classes to use on bottom element. Default '.bottom'
.
element
: The DOM element of the list.
height
: The total height of the container. Default 500
.
rowHeight
: The height of each row. Default 30
.
eachrow
: A function that gets called for each row to return a custom element per row. Default:
function (row) {
return this.html(this.childTagName, {
style: {
height: this.rowHeight
}
}, [row])
}
Listen for events with list.addEventListener(name, function () {})
.
load
: Called when element has loaded.scroll
: Called when element has been scrolled.(c) 2016 Kyle Robinson Young. MIT License
FAQs
An infinite scrolling list view element built on a virtual DOM.
The npm package view-list receives a total of 60 weekly downloads. As such, view-list popularity was classified as not popular.
We found that view-list demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.