From 959ede7b2e8720559e0514422efda38e24650de9 Mon Sep 17 00:00:00 2001 From: Luv Patel Date: Tue, 3 Oct 2023 09:50:28 +0530 Subject: [PATCH 01/10] added Textarea-ref in docs --- docs/data/joy/components/textarea/textarea.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/data/joy/components/textarea/textarea.md b/docs/data/joy/components/textarea/textarea.md index 06a8652a80dacd..d903931e923aa3 100644 --- a/docs/data/joy/components/textarea/textarea.md +++ b/docs/data/joy/components/textarea/textarea.md @@ -115,6 +115,20 @@ It's usually more common to see textarea components using decorators at the top {{"demo": "TextareaDecorators.js"}} +### Textarea ref +`useRef` in React is typically used to reference a DOM element or a component. In the case of form inputs like Input or TextArea in Joy UI, you can use useRef to access and interact with the underlying DOM node directly without causing re-renders. + +{{"demo": "TextareauseRef.js"}} + +Input: +```js + +``` +Textarea: +```js +