List controller build on top of component/reactive. Blog post
Install with component(1):
$ component install mikanda/reactive-list
add(index, model, el)- Fired when an element was added.modelis the model associated with the element.elis theDOMElementwhich was removed.remove(index, model, el)- Fired when an element was removed.
Initialize the widget.
elis the container element to usetemplateis the component/reactive template used to generate the rowsviewis the optional view passed to reactive per default
Insert a new sub-widget. If index is given replace the element at
index otherwise insert at index 0. Returns the newly created
DOMElement. model is an optional model to bind with reactive.
Append a new sub-widget. If index is given append after the
element at index. Returns the newly created DOMElement.
model is the same as in .insert().
Remove the element at index. Returns the model stored at index.
MIT