From 3884c96ddfbe7dc7a1435c0504e0a745601dd6a2 Mon Sep 17 00:00:00 2001 From: ndom91 Date: Wed, 30 Oct 2024 14:34:25 +0100 Subject: [PATCH] feat: double input handling and blur clear --- .../branch/StackingSeriesDescription.svelte | 22 +++++++------- .../lib/branch/StackingSeriesHeader.svelte | 29 ++++++------------- .../StackingSeriesHeaderContextMenu.svelte | 5 +--- packages/ui/src/lib/Textarea.svelte | 5 +--- 4 files changed, 23 insertions(+), 38 deletions(-) diff --git a/apps/desktop/src/lib/branch/StackingSeriesDescription.svelte b/apps/desktop/src/lib/branch/StackingSeriesDescription.svelte index 25c5990ef..f6349c570 100644 --- a/apps/desktop/src/lib/branch/StackingSeriesDescription.svelte +++ b/apps/desktop/src/lib/branch/StackingSeriesDescription.svelte @@ -2,34 +2,36 @@ import Textarea from '@gitbutler/ui/Textarea.svelte'; interface Props { - autofocus?: boolean; - - value: string; + value?: string; disabled?: boolean; - oninput?: (e: Event & { currentTarget: EventTarget & HTMLTextAreaElement }) => void; onEmpty?: () => void; + onBlur?: (value: string | undefined | null) => void; + textAreaEl?: HTMLDivElement; } - const { autofocus, value, disabled = false, oninput, onEmpty }: Props = $props(); - let textareaEl: HTMLDivElement | undefined = $state(); + let { value, disabled = false, onBlur, onEmpty, textAreaEl = $bindable() }: Props = $props();