md-dialog close on esc or click outside giving error of mutating prop
abhimanusharma opened this issue · 0 comments
abhimanusharma commented
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?