Open vgoklani opened 9 years ago
Modify the array and render:
data.unshift('item on top')
data = data.slice(0, 15)
viewlist.render(data)
Yep, modify the array and render:
data = data.filter(function (row) {
return row === 'row we want'
})
viewlist.render(data)
Thanks!
Is it a simple process to extend this approach to a full table (with columns)? Also, how would you optimize for mobile?
Yep! By default it uses ul/li
but you can change that by setting the tagName
to 'table'
and childTagName
to 'tr'
. Then return rows with columns on eachrow
.
I recommend extending this element if you're planning on something more sophisticated like that. Here is an example of someone else extending this element: https://github.com/sethvincent/data-cards
Almost have it, what do you mean by this: "Then return rows with columns on eachrow."
Nice library! I have a few quick questions:
Thanks!