MCPcopy
hub / github.com/plotly/dash / checkControlledValueProps

Function checkControlledValueProps

dash/deps/react-dom@18.2.0.js:1576–1586  ·  view source on GitHub ↗
(tagName, props)

Source from the content-addressed store, hash-verified

1574 submit: true
1575 };
1576 function checkControlledValueProps(tagName, props) {
1577 {
1578 if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
1579 error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
1580 }
1581
1582 if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
1583 error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
1584 }
1585 }
1586 }
1587
1588 function isCheckable(elem) {
1589 var type = elem.type;

Callers 3

initWrapperStateFunction · 0.70
checkSelectPropTypesFunction · 0.70
initWrapperState$2Function · 0.70

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…