tmpvar/weld

map and access to the row data

Opened this issue · 0 comments

I was wondering how we can have access to row data in the map function :

weld(document.getElementById("data"), page, 
          {
            map: function(parent, element, row) {
                if (key === 'title') {
                    element.setAttribute('href', row.url);
                                        element.innerText = row.title;
                    return true;
                }
             }
          });

This would make more sense and allow for a more powerful templates