mirror of
https://github.com/kevin-DL/build-gmail-clone-with-vue-3.git
synced 2026-01-19 13:55:19 +00:00
Move modal into a portal, just because we can
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
<p>Loading...</p>
|
||||
</template>
|
||||
</suspense>
|
||||
|
||||
<div id="modal-portal"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -18,11 +18,13 @@
|
||||
<td class="date">{{format(new Date(email.sentDate), 'MMM do yyyy')}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ModalView :isOpened="!!openedEmail" :closeModal="() => {openedEmail = null;}">
|
||||
<MailView :email="openedEmail" />
|
||||
</ModalView>
|
||||
<portal target="#modal-portal">
|
||||
<ModalView :isOpened="!!openedEmail" :closeModal="() => {openedEmail = null;}">
|
||||
<MailView :email="openedEmail" />
|
||||
</ModalView>
|
||||
</portal>
|
||||
</table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user