1👍
✅
Correct if Im wrong but in your Child
you are passing a function as a prop which in vue is an anti pattern. You should always follow the props down event up
design pattern.
Anyway, continue to your problem. On your Child 2
you have the following line
items: this.tableData
This line will assign the value of this.tableData
to items
. This is only assigned on the created hook part of the component. If this table data changes (which I’m fairly sure it does) the item
variable won’t be updated. You should have a watch watching the prop and re-assign to item
watch: {
tableData: (value) => {
this.item = value;
}
}
Source:stackexchange.com