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>