A
A
Anton Anton2017-08-04 14:19:11
JavaScript
Anton Anton, 2017-08-04 14:19:11

How to get a non-reactive copy of vue data other than via JSON.parse(JSON.stringify)?

Now, when clicked, an editing window opens, when confirmed, the data element is overwritten. So that when editing in the window the properties of the edited object itself do not change, I had to make a copy via JSON.
https://jsfiddle.net/pwL0c4m5/15/
the example is spherical in a vacuum, don't talk about selecting a window into a component, especially since when passing a reactive object through props, everything works the same way.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Koch, 2017-08-04
@Fragster

i am using _.clone, _.cloneDeep from lodash .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question