Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Avoid mutating a prop directly... #23

Closed
adin234 opened this issue Jul 12, 2018 · 5 comments
Closed

Avoid mutating a prop directly... #23

adin234 opened this issue Jul 12, 2018 · 5 comments

Comments

@adin234
Copy link

adin234 commented Jul 12, 2018

found in
---> <RenderFormItem>
       <ElForm>
         <ElFormRenderer>
           <MyComponent> at src/path/to/my/Component.vue
             <Root>
[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "value"

Upon inspection, it seems like this is the line affecting this because the error went away when i did this but of course the form stopped working afterwards

#Sample
https://github.com/adin234/el-form-renderer-warning

@leezng
Copy link
Owner

leezng commented Jul 12, 2018

@adin234 Add an example please

@adin234
Copy link
Author

adin234 commented Jul 13, 2018

@FerrielMelarpis
Copy link

I believe this is related to this issue vuejs/vue-test-utils#532

@leezng
Copy link
Owner

leezng commented Jul 17, 2018

After I ran the code, I found no warning in this example. Do you have the missing code? Or provide more detailed information.
image

@adin234
Copy link
Author

adin234 commented Jul 17, 2018

it happens in the test, i think @FerrielMelarpis i right, it is related to the issue he linked.

@adin234 adin234 closed this as completed Jul 17, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants