fix: add special requests to store

This commit is contained in:
Christel Westerberg
2024-12-11 15:19:43 +01:00
parent ed3879f6d2
commit 4872847ecb
10 changed files with 26 additions and 30 deletions

View File

@@ -15,8 +15,6 @@ import Body from "../../Text/Body"
import styles from "./textarea.module.css"
import type { HTMLAttributes, WheelEvent } from "react"
import type { TextAreaProps } from "./input"
export default function TextArea({
@@ -29,15 +27,9 @@ export default function TextArea({
placeholder = "",
readOnly = false,
registerOptions = {},
type = "text",
}: TextAreaProps) {
const { control } = useFormContext()
let numberAttributes: HTMLAttributes<HTMLTextAreaElement> = {}
if (type === "number") {
numberAttributes.onWheel = function (evt: WheelEvent<HTMLTextAreaElement>) {
evt.currentTarget.blur()
}
}
return (
<Controller
disabled={disabled}