I am currently working on an HTML modal form that allows me to update the selected post. I have set up a click event that retrieves the data for the chosen post, and then passes it to the form to populate the fields. However, I encountered an issue when trying to hide the form using v-if, resulting in the error message:
Cannot read property 'populateFormFields' of undefined
I suspect this error occurs because the function does not exist when the component is hidden.
My goal is to trigger a function in AppSummary.vue whenever a post is clicked, passing the post's data to UpdateForm.vue to fill out the fields before displaying the form modal. What would be the most effective approach for achieving this?
Here is my code:
/src/components/AppSummary.vue
<!-- Code snippet here -->
/src/components/UpdateForm.vue
<!-- Code snippet here -->