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 }) => {