Rows
You bind your list of items as array of objects to rows
props to vue-bootstrap4-table
component, then voilà.. you can start work with the table.
Basic structure
For example, your "rows" object might look like this,
Row Slot
At some point, you might want to override or format the values in the row cells. vue-bootstrap4-table
allow you to achieve that with the help of vue slotting.
Example
Slot name will be same as the name which you provided in the columns configuration. In the above example, slot="email"
represents the "email" column in the table.
Note
You might have some columns getting the values from nested objects from rows
. In that case, the slot name will be 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 name_first_name
.
props
From slot-scope="props"
you can access the following attributes.
Attributes
Description
props.cell_value
Returns the actual value of the cell
props.row
Current row object
props.column
Current column config object
Last updated