MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / updateProperties$1

Function updateProperties$1

code/third-party/public/app.js:15767–15798  ·  view source on GitHub ↗
(domElement, updatePayload, tag, lastRawProps, nextRawProps)

Source from the content-addressed store, hash-verified

15765
15766// Apply the diff.
15767function updateProperties$1(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
15768 // Update checked *before* name.
15769 // In the middle of an update, it is possible to have multiple checked.
15770 // When a checked radio tries to change name, browser makes another radio's checked false.
15771 if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
15772 updateChecked(domElement, nextRawProps);
15773 }
15774
15775 var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
15776 var isCustomComponentTag = isCustomComponent(tag, nextRawProps);
15777 // Apply the diff.
15778 updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag);
15779
15780 // TODO: Ensure that an update gets scheduled if any of the special props
15781 // changed.
15782 switch (tag) {
15783 case 'input':
15784 // Update the wrapper around inputs *after* updating props. This has to
15785 // happen after `updateDOMProperties`. Otherwise HTML5 input validations
15786 // raise warnings and prevent the new value from being assigned.
15787 updateWrapper(domElement, nextRawProps);
15788 break;
15789 case 'textarea':
15790 updateWrapper$1(domElement, nextRawProps);
15791 break;
15792 case 'select':
15793 // <select> value update needs to occur after <option> children
15794 // reconciliation
15795 postUpdateWrapper(domElement, nextRawProps);
15796 break;
15797 }
15798}
15799
15800function getPossibleStandardName(propName) {
15801 {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected