Harmonic / vue-tailwind-modal

A modal box made for Vue that uses Tailwind CSS
28 stars 7 forks source link

backgroundClose doesn't work #31

Closed lonagi closed 3 years ago

lonagi commented 3 years ago

I click to background, but modal doesn't hide. Also, I don't see any error or warn

lonagi commented 3 years ago

If I change the state using Vue Google Chrome plugin for backgroundClose, I get this warn

[Vue warn]: 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: "backgroundClose"

craigharman commented 3 years ago

Based on this I am assuming you didn't have show closed enabled? I will close this and address the other issue.

lonagi commented 3 years ago

Based on this I am assuming you didn't have show closed enabled? I will close this and address the other issue.

That issue is other problem. I changed local code myself. For that, I have found solution. I just set showModal variable for :showing, because as there is static boolean value modal doesn't work. But If I bind it to a var, it works !)

image

image

and add this var to data()

image