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

Function updateProperties$1

code/composition/public/app.js:16672–16703  ·  view source on GitHub ↗
(domElement, updatePayload, tag, lastRawProps, nextRawProps)

Source from the content-addressed store, hash-verified

16670
16671// Apply the diff.
16672function updateProperties$1(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
16673 // Update checked *before* name.
16674 // In the middle of an update, it is possible to have multiple checked.
16675 // When a checked radio tries to change name, browser makes another radio's checked false.
16676 if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
16677 updateChecked(domElement, nextRawProps);
16678 }
16679
16680 var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
16681 var isCustomComponentTag = isCustomComponent(tag, nextRawProps);
16682 // Apply the diff.
16683 updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag);
16684
16685 // TODO: Ensure that an update gets scheduled if any of the special props
16686 // changed.
16687 switch (tag) {
16688 case 'input':
16689 // Update the wrapper around inputs *after* updating props. This has to
16690 // happen after `updateDOMProperties`. Otherwise HTML5 input validations
16691 // raise warnings and prevent the new value from being assigned.
16692 updateWrapper(domElement, nextRawProps);
16693 break;
16694 case 'textarea':
16695 updateWrapper$1(domElement, nextRawProps);
16696 break;
16697 case 'select':
16698 // <select> value update needs to occur after <option> children
16699 // reconciliation
16700 postUpdateWrapper(domElement, nextRawProps);
16701 break;
16702 }
16703}
16704
16705function getPossibleStandardName(propName) {
16706 {

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