MCPcopy Index your code
hub / github.com/caseywebdev/react-list / updateProperties

Function updateProperties

docs/index.js:16479–16807  ·  view source on GitHub ↗
(domElement, tag, lastProps, nextProps)

Source from the content-addressed store, hash-verified

16477 setProp(domElement, tag, defaultValue, hasSrc, props, null));
16478}
16479function updateProperties(domElement, tag, lastProps, nextProps) {
16480 switch (tag) {
16481 case "div":
16482 case "span":
16483 case "svg":
16484 case "path":
16485 case "a":
16486 case "g":
16487 case "p":
16488 case "li":
16489 break;
16490 case "input":
16491 var name = null,
16492 type = null,
16493 value = null,
16494 defaultValue = null,
16495 lastDefaultValue = null,
16496 checked = null,
16497 defaultChecked = null;
16498 for (propKey in lastProps) {
16499 var lastProp = lastProps[propKey];
16500 if (lastProps.hasOwnProperty(propKey) && null != lastProp)
16501 switch (propKey) {
16502 case "checked":
16503 break;
16504 case "value":
16505 break;
16506 case "defaultValue":
16507 lastDefaultValue = lastProp;
16508 default:
16509 nextProps.hasOwnProperty(propKey) ||
16510 setProp(domElement, tag, propKey, null, nextProps, lastProp);
16511 }
16512 }
16513 for (var propKey$203 in nextProps) {
16514 var propKey = nextProps[propKey$203];
16515 lastProp = lastProps[propKey$203];
16516 if (
16517 nextProps.hasOwnProperty(propKey$203) &&
16518 (null != propKey || null != lastProp)
16519 )
16520 switch (propKey$203) {
16521 case "type":
16522 type = propKey;
16523 break;
16524 case "name":
16525 name = propKey;
16526 break;
16527 case "checked":
16528 checked = propKey;
16529 break;
16530 case "defaultChecked":
16531 defaultChecked = propKey;
16532 break;
16533 case "value":
16534 value = propKey;
16535 break;
16536 case "defaultValue":

Callers 2

commitHostUpdateFunction · 0.85
commitUpdateFunction · 0.85

Calls 8

setPropFunction · 0.85
formatProdErrorMessageFunction · 0.85
updateInputFunction · 0.85
updateOptionsFunction · 0.85
updateTextareaFunction · 0.85
isCustomElementFunction · 0.85
setPropOnCustomElementFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…