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

Function initWrapperState$1

code/communication/public/app.js:14611–14629  ·  view source on GitHub ↗
(element, props)

Source from the content-addressed store, hash-verified

14609}
14610
14611function initWrapperState$1(element, props) {
14612 var node = element;
14613 {
14614 checkSelectPropTypes(props);
14615 }
14616
14617 var value = props.value;
14618 node._wrapperState = {
14619 initialValue: value != null ? value : props.defaultValue,
14620 wasMultiple: !!props.multiple
14621 };
14622
14623 {
14624 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
14625 warning(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
14626 didWarnValueDefaultValue$1 = true;
14627 }
14628 }
14629}
14630
14631function postMountWrapper$2(element, props) {
14632 var node = element;

Callers 2

setInitialProperties$1Function · 0.70
diffHydratedProperties$1Function · 0.70

Calls 2

warningFunction · 0.85
checkSelectPropTypesFunction · 0.70

Tested by

no test coverage detected