diff --git a/docs/data/joy/components/textarea/TextareaRef.js b/docs/data/joy/components/textarea/TextareaRef.js new file mode 100644 index 00000000000000..886f0fcebd048e --- /dev/null +++ b/docs/data/joy/components/textarea/TextareaRef.js @@ -0,0 +1,22 @@ +import * as React from 'react'; +import Button from '@mui/joy/Button'; +import Textarea from '@mui/joy/Textarea'; +import Stack from '@mui/joy/Stack'; + +export default function TextareaRef() { + const textareaRef = React.useRef(null); + + const handleTextareaFocus = () => { + textareaRef.current?.focus(); + }; + + return ( + +