vue-final-modal icon indicating copy to clipboard operation
vue-final-modal copied to clipboard

How to Open Multiple modals?

Open Saqib92 opened this issue 3 years ago • 2 comments

Version

vue-final-modal: ^3.4.4 vue: ^3.2.36 nuxt: none

OS

Mac

What is Expected?

I want to open multiple Modals from a list to show details. but i scenario is user can open Multiple Modals to compare details between them. How can i open multiple modals? I have a list with view details button using v-for loop. I am able to open single draggable Modal with details about click item. but how can i open Multiple modals???

What is actually happening?

Can open single modal at a time.

Saqib92 avatar Jun 08 '22 13:06 Saqib92

You can checkout Stackable section here: https://v3.vue-final-modal.org/examples/stepByStep

hunterliu1003 avatar Jun 14 '22 06:06 hunterliu1003

i have managed to open multiple modals without stackable option. Will share my workaround.

Saqib92 avatar Jun 14 '22 07:06 Saqib92

i have managed to open multiple modals without stackable option. Will share my workaround.

can you please share your workaround?

JackEdwardLyons avatar Feb 14 '23 05:02 JackEdwardLyons

i have managed to open multiple modals without stackable option. Will share my workaround.

can you please share your workaround?

I don't exactly remember but something like this:

<div v-for="(i, index) in Floormodal" :key="index">
     <VueFinalModal :id="index" @click="BringFront(index)" v-model="i.modal" :drag="true" :esc-to-close="true" :hide-overlay="true"
       :prevent-click="true" :fit-parent="false" :click-to-close="true" :lock-scroll="false"
       :style="!FullModal ?  ModalCss : ModalFullscreen" :content-style="{ 'width': '100%' }"
       :class="i.modal ? 'opened' : ''">
           <div style="width: 100%" v-if="i.modal" >
               // modal body here
           </div>
    </VueFinalModal>
 </div>

wrapped it inside v-for and make obj.modal to true.

Saqib92 avatar Feb 14 '23 06:02 Saqib92