Reputation: 4281
I have a modal component with textarea which I use to edit data
that's in my main instance. So the idea is when I open the modal component, the textarea should be showing current data
value from the main instance, this can be done by passing data
as prop to the modal component. But since it's prop, vue doesn't allow me to edit it in textarea. And if I use v-model
for the textarea, how do I get the original data
value the moment my modal popup?
Back in 1.x, I just need to add "two-way: true", but this approach depreciated in 2.0.
Upvotes: 0
Views: 1009
Reputation: 14393
pass myProp object as a prop and on the text area you pass v-model="myProp.cellModel"
Upvotes: 2