independent full stack developer

/ Developer's blog

Problem rendering component row in table with Vuejs

Tuesday, March 19, 2024

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!

 

2044 people already saw it