yuche / vue-strap

Bootstrap components built with Vue.js
http://yuche.github.io/vue-strap/
MIT License
4.71k stars 935 forks source link

Problem with modal dialog from example: Missing required prop: "show" #481

Open stefanoborini opened 7 years ago

stefanoborini commented 7 years ago

I tried adding the following, as from the documentation example

<modal v-model="show" @ok="show = false"></modal>

My hosting component also has a data() function returning a model object with the show key set to false. When I load the page, Vue reports the following error:

[Vue warn]: Missing required prop: "show" 
(found in <Modal>)

Which is strange, since the Modal component does not require a prop "show".

Found with vue-strap 1.1.37.

SladeRipfire commented 7 years ago

Are you using Vue2? Here's a fork that updated this lib for Vue2 use: https://github.com/wffranco/vue-strap

iamvitali commented 6 years ago

For me it's different for some reason.

It says :value is required, and indeed Modal.vue says value: {type: Boolean, required: true}, but .... this value is not mentioned anywhere in the docs for Modal. :/

http://yuche.github.io/vue-strap/#modal

BwanaRPB commented 6 years ago

Use :value="showModal" Where showModal is the boolean declared in your data section that controls the visibility of the modal