b-table of the Vue boostrap

Asked

Viewed 43 times

0

I’m using the b-table of Bootstrap of Vue.

I have an object in this format:

inserir a descrição da imagem aqui

And the table is populating like this:

inserir a descrição da imagem aqui

It is throwing the whole object into the field, as we can see in these circular fields, but I would like to be able to choose the items to be displayed as in the fields with arrow. How do I access the object levels?

Code to create table:

<div class="driver-admin">
    <b-table hover striped :items="drivers"></b-table>
</div>
  • It’s just that in this object of yours, there’s another object inside it and an array. So hint like this. Address and Document have to treat differently, for example being just other normal fields in the object (such as state and city).

1 answer

0

according to the documentation, you can use the props Fields. In the component vc would put :Fields="Fields" and then in the date of the component vc populate the fields with an array containing a list of the names of the fields Voce wants to bring..

Link to the documentation

Browser other questions tagged

You are not signed in. Login or sign up in order to post.