Package Exports
- list-editor
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (list-editor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
list-editor
A virtual-dom element for editing a small list of items. The list can be an array or flat object.
Example
var raf = require('virtual-raf')
var listEditor = require('list-editor')
function render (state) {
function removeItem (e, items) {
state.items = items
tree.update(state)
}
function onsubmit (e, items, item) {
state.items = items
tree.update(state)
}
function oninput (e, value) {}
state.removeItem = removeItem
state.onsubmit = onsubmit
state.oninput = oninput
return listEditor(h, state)
}
var tree = raf({ items: {}, keys: true }, render, require('virtual-dom'))
document.body.appendChild(tree())License
MIT