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

Function updateProperties$1

code/dependency-injection/public/app.js:16627–16658  ·  view source on GitHub ↗
(domElement, updatePayload, tag, lastRawProps, nextRawProps)

Source from the content-addressed store, hash-verified

16625
16626// Apply the diff.
16627function updateProperties$1(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
16628 // Update checked *before* name.
16629 // In the middle of an update, it is possible to have multiple checked.
16630 // When a checked radio tries to change name, browser makes another radio's checked false.
16631 if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
16632 updateChecked(domElement, nextRawProps);
16633 }
16634
16635 var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
16636 var isCustomComponentTag = isCustomComponent(tag, nextRawProps);
16637 // Apply the diff.
16638 updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag);
16639
16640 // TODO: Ensure that an update gets scheduled if any of the special props
16641 // changed.
16642 switch (tag) {
16643 case 'input':
16644 // Update the wrapper around inputs *after* updating props. This has to
16645 // happen after `updateDOMProperties`. Otherwise HTML5 input validations
16646 // raise warnings and prevent the new value from being assigned.
16647 updateWrapper(domElement, nextRawProps);
16648 break;
16649 case 'textarea':
16650 updateWrapper$1(domElement, nextRawProps);
16651 break;
16652 case 'select':
16653 // <select> value update needs to occur after <option> children
16654 // reconciliation
16655 postUpdateWrapper(domElement, nextRawProps);
16656 break;
16657 }
16658}
16659
16660function getPossibleStandardName(propName) {
16661 {

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