independent full stack developer

/ Developer's blog

Problem rendering component row in table with Vuejs

Wednesday, December 01, 2021

You created a vuejs component that contains a table row, inserted it to tbody and noticed that it appear about the table? Yeah,  me too, there is my solution.

If you experience something like that, means that you did something wrong :) Please check the docs firstly (Vuejs Docs) about that, and if you can't find the solution, back to me and check my solution.

Everything that you need to replaces your component with table row ans special param is. Please check, what we had:

<tr>
<item-row v-for="item in items" :item="item"></item-row>
</tr>

Refactor it with the next

<tr v-for="item in items" is="item-row" :item="item"></tr>
 

And voila, it works!

 

1171 people already saw it