0

I am using laravel 8 with inertia js. I have created a component that is a modal. It can be called from the parent component without any problem and send the information. The problem is when the modal is hidden, in console it shows:

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: "modaldeletep"

If you hide the modal, but the error persists in console..

Button.. @click="close()"

script

  props: {
   brandp: {
    type: Object,
    },
   modaldeletep: {
    type: Boolean,
    },
  }......

methods....

close() {
  this.modaldeletep = false;
},

Component modal:

<ModalDelete :brandp="info" :modaldeletep="statusmodal"></ModalDelete>
datanorte
  • 13
  • 3
  • Does this answer your question? [vuejs update parent data from child component](https://stackoverflow.com/questions/40915436/vuejs-update-parent-data-from-child-component) – str Nov 18 '20 at 08:20
  • Does this answer your question? https://stackoverflow.com/questions/39868963/vue-2-mutating-props-vue-warn – str Nov 18 '20 at 08:22
  • You need post the Component definition for *ModalDelete* – Wakeel Nov 18 '20 at 08:26

0 Answers0