Hi
Can i apply a css class to a row identified with selectedTo?
Es.
rowCss (check) {
if(check===true) {
console.log(this.$refs.vuetable.selectedTo)
this.$refs.vuetable.selectedTo.rowClass='bg-blu' //something like this
}
},
onToggledChbox(chk,dataItem) {
this.rowCss(chk)
}
And is it possible to identify a specific td inside a selected row?
Tnks
You should be able to use row-class prop to do that.
<vuetable ref="vuetable"
:row-class="onRowClass"
></vuetable>
//...
methods: {
onRowClass(dataItem, index) {
// put your logic here
// to reference selectedTo, use `this.$refs.vuetable.selectedTo`
// and return the CSS class name you want
return this.$refs.vuetable.selectedTo.indexOf(dataItem.id) > -1
? 'bg-blu'
: 'bg-white'
}
}
Most helpful comment
You should be able to use
row-classprop to do that.