MCPcopy Create free account
hub / github.com/reactjs/react-rails / updateProperties

Function updateProperties

lib/assets/react-source/development/react.js:9936–9968  ·  view source on GitHub ↗
(domElement, updatePayload, tag, lastRawProps, nextRawProps)

Source from the content-addressed store, hash-verified

9934 } // Apply the diff.
9935
9936 function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
9937 // Update checked *before* name.
9938 // In the middle of an update, it is possible to have multiple checked.
9939 // When a checked radio tries to change name, browser makes another radio's checked false.
9940 if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
9941 updateChecked(domElement, nextRawProps);
9942 }
9943
9944 var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
9945 var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.
9946
9947 updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props
9948 // changed.
9949
9950 switch (tag) {
9951 case 'input':
9952 // Update the wrapper around inputs *after* updating props. This has to
9953 // happen after `updateDOMProperties`. Otherwise HTML5 input validations
9954 // raise warnings and prevent the new value from being assigned.
9955 updateWrapper(domElement, nextRawProps);
9956 break;
9957
9958 case 'textarea':
9959 updateWrapper$1(domElement, nextRawProps);
9960 break;
9961
9962 case 'select':
9963 // <select> value update needs to occur after <option> children
9964 // reconciliation
9965 postUpdateWrapper(domElement, nextRawProps);
9966 break;
9967 }
9968 }
9969
9970 function getPossibleStandardName(propName) {
9971 {

Callers 1

commitUpdateFunction · 0.85

Calls 6

updateCheckedFunction · 0.85
updateDOMPropertiesFunction · 0.85
updateWrapperFunction · 0.85
updateWrapper$1Function · 0.85
postUpdateWrapperFunction · 0.85
isCustomComponentFunction · 0.70

Tested by

no test coverage detected