Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add methods to update a row/column data without refreshing whole table. #30

Open
theharshin opened this issue Sep 21, 2023 · 0 comments

Comments

@theharshin
Copy link
Member

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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant