From 189662b9e08fa966373538d228540d5290df56da Mon Sep 17 00:00:00 2001 From: thislight Date: Sat, 21 Dec 2024 17:14:51 +0800 Subject: [PATCH] TextField: minor type fix --- src/material/TextField.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/material/TextField.tsx b/src/material/TextField.tsx index df0f7fc..6dcfe00 100644 --- a/src/material/TextField.tsx +++ b/src/material/TextField.tsx @@ -28,14 +28,14 @@ const TextField: Component = (props) => { createEffect(() => { if (hasContent()) { - field.classList.add("float-label"); + field!.classList.add("float-label"); } else { - field.classList.remove("float-label"); + field!.classList.remove("float-label"); } }); onMount(() => { - setHasContent(input.value.length > 0); + setHasContent(input!.value.length > 0); }); const onInputChange = (e: { currentTarget: HTMLInputElement }) => {