Phil Cooper Phil Cooper - 5 months ago 26
HTML Question

riotjs rendering nested tags rows outside of table

See this fiddle.

There is a parent

<table>
html tag and nested custom riot tag to build up the row.

On inspecting the generated mark-up the test rows are rendered outside of the table.

If I use nested
<div />
s in this way, it renders as I expect - children of the elements. Is this by design? Or a quirk of the way rendering works internally with html tables?

Answer

Seems like a bug to me, even if you use the latest riot version 2.4.1, your testrow is not rendered in the table-element.

Riot 2.3.17 introduced a new data-is-attribute, which could resolve your issue:

<table>
  <tbody data-is="test-row"></tbody>
</table>

https://jsfiddle.net/v5ytp918/4/

Comments