Export input events from TextArea (#2477)

Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
This commit is contained in:
Sergei Ogorelkov 2022-12-28 09:45:59 +06:00 committed by GitHub
parent fc6b62ac30
commit 67504132f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,6 @@
<script lang="ts">
import type { IntlString } from '@hcengineering/platform'
import { translate } from '@hcengineering/platform'
import { createEventDispatcher } from 'svelte'
import plugin from '../plugin'
import Label from './Label.svelte'
@ -38,17 +37,21 @@
export function focus () {
input.focus()
}
const dispatch = createEventDispatcher()
const onKeydown = (e: any) => {
dispatch('keydown', e)
}
</script>
<div class="textarea" class:no-focus-border={noFocusBorder} style:width style:height>
{#if label}<div class="label"><Label {label} /></div>{/if}
<textarea bind:value bind:this={input} on:keydown={onKeydown} {disabled} placeholder={phTraslate} />
<textarea
bind:value
bind:this={input}
{disabled}
placeholder={phTraslate}
on:keydown
on:change
on:keydown
on:keypress
on:blur
/>
</div>
<style lang="scss">