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

Function updateProperties$1

code/styling/public/app.js:16534–16565  ·  view source on GitHub ↗
(domElement, updatePayload, tag, lastRawProps, nextRawProps)

Source from the content-addressed store, hash-verified

16532
16533// Apply the diff.
16534function updateProperties$1(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
16535 // Update checked *before* name.
16536 // In the middle of an update, it is possible to have multiple checked.
16537 // When a checked radio tries to change name, browser makes another radio's checked false.
16538 if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
16539 updateChecked(domElement, nextRawProps);
16540 }
16541
16542 var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
16543 var isCustomComponentTag = isCustomComponent(tag, nextRawProps);
16544 // Apply the diff.
16545 updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag);
16546
16547 // TODO: Ensure that an update gets scheduled if any of the special props
16548 // changed.
16549 switch (tag) {
16550 case 'input':
16551 // Update the wrapper around inputs *after* updating props. This has to
16552 // happen after `updateDOMProperties`. Otherwise HTML5 input validations
16553 // raise warnings and prevent the new value from being assigned.
16554 updateWrapper(domElement, nextRawProps);
16555 break;
16556 case 'textarea':
16557 updateWrapper$1(domElement, nextRawProps);
16558 break;
16559 case 'select':
16560 // <select> value update needs to occur after <option> children
16561 // reconciliation
16562 postUpdateWrapper(domElement, nextRawProps);
16563 break;
16564 }
16565}
16566
16567function getPossibleStandardName(propName) {
16568 {

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