vue-strap icon indicating copy to clipboard operation
vue-strap copied to clipboard

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

Open stefanoborini opened this issue 8 years ago • 3 comments

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.

stefanoborini avatar May 09 '17 10:05 stefanoborini

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

SladeRipfire avatar May 09 '17 20:05 SladeRipfire

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

iamvitali avatar Jul 28 '17 15:07 iamvitali

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

BwanaRPB avatar Nov 06 '17 23:11 BwanaRPB