0

I was looking at dom-repeaters with the template tag. So i was going to walk an array. I wanted to then walk the properties of the object itself.

I didnt see anything online though. I was thinking of something like

<template is="dom-repeat" items="{{data}}" as="row">
  <template is="dom-repeat" items="{{row}}" as="prop">
    <div>{{prop}}</div>
  </template>
</tempalate>

but the console throws one of those terrible stack traces about null not having the method "_badUpgrade". Maybe there is better documentation for 1.0 Polymer as to repeating over a dynamic object?

My end state is to create a datagrid allowing dynamic headers and dynamic data.... so the keys of the headers have to be a subset of the data properties so the correct items are assigned under the correct columns etc

Fallenreaper
  • 10,222
  • 12
  • 66
  • 129
  • 2
    Possible duplicate of [How to use dom-repeat with objects instead of arrays in Polymer 1.0?](http://stackoverflow.com/questions/30781500/how-to-use-dom-repeat-with-objects-instead-of-arrays-in-polymer-1-0) – Günter Zöchbauer Mar 18 '16 at 16:20
  • 2
    Is the `as="dom-repeat"` valid, shouldn't it be `is`? `as` is the current item in the array or? – Jonas Bojesen Mar 18 '16 at 17:25
  • You are correct, It seemed to be a mistype on my posts end. I think the issue right now that I have is that i am trying to use polymer dart so the Answer proposed is not correct. The row is being populated by doing a clear("colKeyData"); addAll("colKeyData", myList); but doesnt seem to understand what myList is. – Fallenreaper Mar 21 '16 at 15:49

0 Answers0