Create following methods:
updateRow(rowId,(context)=>{
return {
//Keys to update
}
})
updateColumn(rowId, columnKey,(context)=>{
return "" //Value to update
})
- The rowId can be either index of the items shown or the unique ID from db.
- The columnKey can be the column name used while defining the columns of the table.
- Context is the object and can have the following keys. Try to add maximum data here which represents the current state of table:
- rowValue
- columnValue: Should be available in case of updateColumn only
- items: All list items
- page
- total
This methods should be accessible by host component like below:
this.$refs.table.updateColumn()
this.$refs.table.updateRow()
Create following methods:
This methods should be accessible by host component like below: