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> <p>Loading...</p>
</template> </template>
</suspense> </suspense>
<div id="modal-portal"></div>
</div> </div>
</template> </template>

View File

@@ -18,11 +18,13 @@
<td class="date">{{format(new Date(email.sentDate), 'MMM do yyyy')}}</td> <td class="date">{{format(new Date(email.sentDate), 'MMM do yyyy')}}</td>
</tr> </tr>
</tbody> </tbody>
</table>
<ModalView :isOpened="!!openedEmail" :closeModal="() => {openedEmail = null;}"> <portal target="#modal-portal">
<MailView :email="openedEmail" /> <ModalView :isOpened="!!openedEmail" :closeModal="() => {openedEmail = null;}">
</ModalView> <MailView :email="openedEmail" />
</ModalView>
</portal>
</table>
</template> </template>
<script> <script>