TextField: minor type fix

This commit is contained in:
thislight 2024-12-21 17:14:51 +08:00
parent 994edfa22c
commit 189662b9e0
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E

View file

@ -28,14 +28,14 @@ const TextField: Component<TextFieldProps> = (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 }) => {