Columns
With the columns
prop you can specify what columns you want to see in the table, enable sorting/filtering and map the data from rows
prop.
Basic structure
For example, your "columns" object might look like this,
Attributes details
Column slot
At some point, you might want to override or format the values in the column header.vue-bootstrap4-table
allow you to achieve that with the help of vue slotting.
Example
Column slot name will be combination of column_
keyword with the name
which you provided in the columns configuration. In the above example, slot="column_email"
represents the "email" column header in the table.
Note
You might have some columns with nested objects names. In that case, the slot name will be column_
keyword + column name
and dots(.) in the column name
will be replaced by underscore(_).
You can see the above example, slot name for name.first_name
column is column_name_first_name
.
props
From slot-scope="props"
you can access the following attributes.
Last updated