Clean Popup (#236)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2021-10-06 15:36:08 +03:00 committed by GitHub
parent d2262bbb16
commit 5ef57b2907
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -14,7 +14,7 @@
-->
<script lang="ts">
import type { IntlString } from '@anticrm/platform'
import { afterUpdate, createEventDispatcher } from 'svelte'
import { createEventDispatcher } from 'svelte'
import { Label, EditWithIcon, IconSearch } from '@anticrm/ui'
import UserInfo from './UserInfo.svelte'
@ -34,8 +34,6 @@
const dispatch = createEventDispatcher()
const query = createQuery()
$: query.query(_class, { name: { $like: '%'+search+'%' } }, result => { objects = result })
afterUpdate(() => { dispatch('update', true) })
</script>
<div class="popup" style="max-height: {(maxHeight) ? maxHeight + 'px' : 'max-content'}">

View File

@ -15,7 +15,7 @@
-->
<script lang="ts">
import { afterUpdate, onMount } from 'svelte'
import { afterUpdate } from 'svelte'
import type { AnySvelteComponent, AnyComponent, PopupAlignment } from '../types'
import { closePopup } from '..'
@ -84,9 +84,9 @@
afterUpdate(() => { fitPopup() })
</script>
<svelte:window on:scroll={fitPopup} on:resize={fitPopup} />
<svelte:window on:resize={fitPopup} />
<div class="popup" bind:this={modalHTML} style={`z-index: ${zIndex + 1};`}>
<svelte:component this={is} {...props} {maxHeight} on:close={ (ev) => close(ev.detail) } on:update={fitPopup} />
<svelte:component this={is} {...props} {maxHeight} on:close={ (ev) => close(ev.detail) } />
</div>
<div bind:this={modalOHTML} class="modal-overlay" style={`z-index: ${zIndex};`} on:click={() => close(undefined)} />