I want to change the style of my table row after it's item was edited. I used vuex and BootstrapVue here.
b-table prop tbody-tr-class setted to rowClass method
<b-table
:tbody-tr-class="rowClass"
...
>
rowClass method looks like
rowClass(item, type) {
if (item.status) return 'table-' + item.status
}
Item update method in Component.vue where item status setted.
editItem(item) {
item.status = 'success'
this.$store.dispatch(UPDATE_ITEM, item)
...
},
I had an error
Invalid prop: type check failed for prop "tbodyTrClass". Expected String, Array, got Function
But next Description is given in official bootstrap-vue docs
Property tbodyTrClass
Type String, Array or Function
Description Classes to be applied to every row on the table. If a function is given, it will be called as tbodyTrClass( item, type ) and it may return an Array, Object or String.
Everything I did looks for me the same as in example here