Move modal into a portal, just because we can

This commit is contained in:
Jeffrey Biles
2020-03-18 13:29:53 -07:00
parent 874481cbde
commit 0a3982c2a4
2 changed files with 8 additions and 4 deletions

View File

@@ -17,6 +17,8 @@
<p>Loading...</p>
</template>
</suspense>
<div id="modal-portal"></div>
</div>
</template>

View File

@@ -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>