updateTextarea() — react Function Reference
Architecture documentation for the updateTextarea() function in ReactDOMTextarea.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 9a72f830_55f2_6169_fd02_f84a667d77d5["updateTextarea()"] 446613e2_b928_8e56_f59b_835fe6aa10b1["ReactDOMTextarea.js"] 9a72f830_55f2_6169_fd02_f84a667d77d5 -->|defined in| 446613e2_b928_8e56_f59b_835fe6aa10b1 2c1752cc_6ff0_f310_f296_a6bfbd1329ed["updateProperties()"] 2c1752cc_6ff0_f310_f296_a6bfbd1329ed -->|calls| 9a72f830_55f2_6169_fd02_f84a667d77d5 52d8fcf5_6a54_e950_e9e8_c5ae37db1a34["restoreControlledTextareaState()"] 52d8fcf5_6a54_e950_e9e8_c5ae37db1a34 -->|calls| 9a72f830_55f2_6169_fd02_f84a667d77d5 11bc3a6e_70c8_ce81_937a_5f465b34744e["toString()"] 9a72f830_55f2_6169_fd02_f84a667d77d5 -->|calls| 11bc3a6e_70c8_ce81_937a_5f465b34744e dc786445_7938_6725_8246_282b089c7878["getToStringValue()"] 9a72f830_55f2_6169_fd02_f84a667d77d5 -->|calls| dc786445_7938_6725_8246_282b089c7878 style 9a72f830_55f2_6169_fd02_f84a667d77d5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-dom-bindings/src/client/ReactDOMTextarea.js lines 64–91
export function updateTextarea(
element: Element,
value: ?string,
defaultValue: ?string,
) {
const node: HTMLTextAreaElement = (element: any);
if (value != null) {
// Cast `value` to a string to ensure the value is set correctly. While
// browsers typically do this as necessary, jsdom doesn't.
const newValue = toString(getToStringValue(value));
// To avoid side effects (such as losing text selection), only set value if changed
if (newValue !== node.value) {
node.value = newValue;
}
// TOOO: This should respect disableInputAttributeSyncing flag.
if (defaultValue == null) {
if (node.defaultValue !== newValue) {
node.defaultValue = newValue;
}
return;
}
}
if (defaultValue != null) {
node.defaultValue = toString(getToStringValue(defaultValue));
} else {
node.defaultValue = '';
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does updateTextarea() do?
updateTextarea() is a function in the react codebase, defined in packages/react-dom-bindings/src/client/ReactDOMTextarea.js.
Where is updateTextarea() defined?
updateTextarea() is defined in packages/react-dom-bindings/src/client/ReactDOMTextarea.js at line 64.
What does updateTextarea() call?
updateTextarea() calls 2 function(s): getToStringValue, toString.
What calls updateTextarea()?
updateTextarea() is called by 2 function(s): restoreControlledTextareaState, updateProperties.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free