From 438292bebf3e295774724418863ebb5620c38cd7 Mon Sep 17 00:00:00 2001 From: Andrey Platov <87076238+aplatoff@users.noreply.github.com> Date: Mon, 13 Dec 2021 10:06:19 +0100 Subject: [PATCH] fire onChange event on clear button (#611) Signed-off-by: Andrey Platov --- packages/ui/src/components/EditWithIcon.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui/src/components/EditWithIcon.svelte b/packages/ui/src/components/EditWithIcon.svelte index 1c380abcf2..9cba79a0b0 100644 --- a/packages/ui/src/components/EditWithIcon.svelte +++ b/packages/ui/src/components/EditWithIcon.svelte @@ -28,14 +28,14 @@ export let value: string | undefined = undefined export let placeholder: string = 'placeholder' - let textHTML: HTMLElement + let textHTML: HTMLInputElement
textHTML.focus()}>
{#if value} -
{ value = '' }}> +
{ textHTML.value = ''; textHTML.dispatchEvent(new Event('change')) }}>