mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-27 10:49:44 +00:00
Export input events from TextArea (#2477)
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
This commit is contained in:
parent
fc6b62ac30
commit
67504132f1
@ -15,7 +15,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { IntlString } from '@hcengineering/platform'
|
import type { IntlString } from '@hcengineering/platform'
|
||||||
import { translate } from '@hcengineering/platform'
|
import { translate } from '@hcengineering/platform'
|
||||||
import { createEventDispatcher } from 'svelte'
|
|
||||||
import plugin from '../plugin'
|
import plugin from '../plugin'
|
||||||
import Label from './Label.svelte'
|
import Label from './Label.svelte'
|
||||||
|
|
||||||
@ -38,17 +37,21 @@
|
|||||||
export function focus () {
|
export function focus () {
|
||||||
input.focus()
|
input.focus()
|
||||||
}
|
}
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
|
||||||
|
|
||||||
const onKeydown = (e: any) => {
|
|
||||||
dispatch('keydown', e)
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="textarea" class:no-focus-border={noFocusBorder} style:width style:height>
|
<div class="textarea" class:no-focus-border={noFocusBorder} style:width style:height>
|
||||||
{#if label}<div class="label"><Label {label} /></div>{/if}
|
{#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>
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
Loading…
Reference in New Issue
Block a user