I am using vue2 with bootstrap-vue. Actually I have a b-table with some fields. One of the fields is 'released' with a boolean value (true/false). I want to have a css class on every row, where the value of the field 'released' is false. For example to show with another text-color that the row is inactive.
How can I achieve that? I did not find a solution in the documentation of bootstrap-vue. Has anyone an idea? (its my first question here, sorry if it might be difficult to understand)
Example (only the row of item 2 should get a css-class on the table-row, cause its not released):
...
<b-table stacked="md" :items="items" :fields="fields" >
...
<script>
...
export default {
data () {
return {
fields: {
{
key: 'id',
label: 'ID',
sortable: true,
class: 'Left',
},
{
key: 'name',
label: 'Name',
sortable: true,
class: 'Left'
},
{
key: 'released',
label: 'Freigegeben',
sortable: true,
class: 'Left'
},
},
items: [
{
id: '1',
name: 'nameA',
released: true,
},
{
id: '2',
name: 'nameB',
released: false,
},
{
id: '3',
name: 'nameC',
released: true,
},
{
id: '4',
name: 'nameD',
released: true,
},
],
},
}
...
}