1
votes

I understand the restriction in dart webui and <template> items.

I.E: one can get around this restriction to use templates for tables thusly:

<table>
  <tbody iterate="row in rows">
  <tr iterate="cell in row">
    <td> {{cell}} </td>
  </tr>
  </tbody>
</table>

However. How is one supposed to use templates when the table should have mutiple tbody sections (e.g: http://jsfiddle.net/umRJr/ )

I.E:

<table>
  <thead><tr><td>title</td></tr></thead>
  <template iterate="section in sections"> <!-- can't do this... :-( -->
    <tbody iterate="row in section">
      <tr iterate="cell in row">
         <td> {{cell}} </td>
      </tr>
    </tbody>
   </template>
</table>

Because we want something like

<table>
   <thead> ... some headers here </thead>
   <tbody> .. content1 .. </tbody>
   <tbody> .. content2 .. </tbody>
    ...
   <tbody> .. content N .. </tbody>
</table>

?

1
Unfortunately, I don't think you can. I guess the best shot here is to get the visuals with CSS classes, and keep all under one tbody.Kai Sellgren
This is a good question. I've opened a bug here: github.com/dart-lang/web-ui/issues/379Seth Ladd
Good news, this will get fixed. Details coming, but check out github.com/dart-lang/html5lib/issues/46Seth Ladd

1 Answers