Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

Open
abhimanusharma opened this issue Mar 4, 2021 · 0 comments

Comments

@abhimanusharma
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant