vuematerial / vue-material

Vue.js Framework - ready-to-use Vue components with Material Design, free forever.
https://www.creative-tim.com/vuematerial
MIT License
9.88k stars 1.16k forks source link

md-dialog close on esc or click outside giving error of mutating prop #2313

Open abhimanusharma opened 3 years ago

abhimanusharma commented 3 years ago

I am using vue 2 and vuematerial 1.0.0-beta-11 version, When I open the dialog it open correctly but when press esc key it shows error below

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

My dialog is inside a reusable component and I am passing <my-dialog :active="activeDialog"/> and in that component I am using

<template>
<md-dialog :md-active.sync="active">
</md-dialog>
</template>

only thing I can do is adding :md-close-on-esc="false" :md-click-outside-to-close="false" properties on my md-model.

any other solution to make this work properly?