0

I'm trying to display a table of flowers but it won't show. I'm not sure how to use my data to display them. any help would be appreciated

<b-table>
        <thead>
          <tr>
            <th>Name</th>
            <th>Petals</th>
          </tr>
        </thead>
        <tbody>
          <tr v-for="flower in flowers" :key="flower.id">
            <td>{{ flower.name }}</td>
            <td>{{ flower.petal }}</td>
          </tr>
        </tbody>
  </b-table>

1 Answer 1

2

That is not how <b-table> is used.

You supply <b-table> with an array, via the items prop, and it will generate the table itself. Which can be further customized by using other props and slots.

I would suggest you look at a few of the examples, to understand how the basics work. https://bootstrap-vue.org/docs/components/table#tables

If you want to write the structure yourself, you should use <b-table-simple>. https://bootstrap-vue.org/docs/components/table#simple-tables

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.