[Vuejs]-Assign label names while looping in Vue

0👍

<md-table-row v-for="(item, rowIndex) in queriedData" :key="rowIndex" :md-item="item">
    <md-table-cell v-for="(column, indexColumn) in columns" :key="indexColumn">
       {{ item[column] }}
</md-table-row>

i don’t see Scoped Slots in your new table anymore. After rendered from first table codes, the cells doesn’t have data-label or such. I would suggest to wrap your like Basic Table as below (that’s if you keen to go with your method)

  <md-table>
      <md-table-row> <!--THEAD-->
        <md-table-head md-numeric>ID</md-table-head>
        <md-table-head>Name</md-table-head>
        <md-table-head>Email</md-table-head>
        <md-table-head>Gender</md-table-head>
        <md-table-head>Job Title</md-table-head>
      </md-table-row>
.
.
.
. //WRAP YOUR LOOP TABLE-ROW HERE.
  </md-table-row>
</md-table>

Lastly, please let us know which framework you using other than just Vue, since took me awhile to figure you’re using Vue Material (since there’re tonnes of frameworks out there, and expect someone to bump in)

Leave a comment