vue-strap
vue-strap copied to clipboard
Problem with modal dialog from example: Missing required prop: "show"
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.
Are you using Vue2? Here's a fork that updated this lib for Vue2 use: https://github.com/wffranco/vue-strap
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
Use :value="showModal" Where showModal is the boolean declared in your data section that controls the visibility of the modal