We're a place where coders share, stay up-to-date and grow their careers.
this.$data is a object, and is a reference. So emitting with this.$data incurs some reference error while running. In order to pass value as a clone, I refactored it like the following.
const reportPartData = { ...this.$data }; this.$emit('submitReportPart', this.index, reportPartData);
And it works well. Thank you for all your commenting here. :heart
this.$data is a object, and is a reference.
So emitting with this.$data incurs some reference error while running.
In order to pass value as a clone, I refactored it like the following.
And it works well.
Thank you for all your commenting here. :heart