Home / Function/ checkSelectPropTypes() — react Function Reference

checkSelectPropTypes() — react Function Reference

Architecture documentation for the checkSelectPropTypes() function in ReactDOMSelect.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  d50cfb99_ac21_660a_f1ea_195e9b8f60cf["checkSelectPropTypes()"]
  45a4825c_28bb_dfd1_ecd2_0adf3836cafc["ReactDOMSelect.js"]
  d50cfb99_ac21_660a_f1ea_195e9b8f60cf -->|defined in| 45a4825c_28bb_dfd1_ecd2_0adf3836cafc
  c18a6119_e933_0faf_e206_a100b0cc50ec["validateSelectProps()"]
  c18a6119_e933_0faf_e206_a100b0cc50ec -->|calls| d50cfb99_ac21_660a_f1ea_195e9b8f60cf
  13aa4525_f6bb_ea7c_3eef_68dfbfb840ed["getDeclarationErrorAddendum()"]
  d50cfb99_ac21_660a_f1ea_195e9b8f60cf -->|calls| 13aa4525_f6bb_ea7c_3eef_68dfbfb840ed
  style d50cfb99_ac21_660a_f1ea_195e9b8f60cf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom-bindings/src/client/ReactDOMSelect.js lines 36–61

function checkSelectPropTypes(props: any) {
  if (__DEV__) {
    for (let i = 0; i < valuePropNames.length; i++) {
      const propName = valuePropNames[i];
      if (props[propName] == null) {
        continue;
      }
      const propNameIsArray = isArray(props[propName]);
      if (props.multiple && !propNameIsArray) {
        console.error(
          'The `%s` prop supplied to <select> must be an array if ' +
            '`multiple` is true.%s',
          propName,
          getDeclarationErrorAddendum(),
        );
      } else if (!props.multiple && propNameIsArray) {
        console.error(
          'The `%s` prop supplied to <select> must be a scalar ' +
            'value if `multiple` is false.%s',
          propName,
          getDeclarationErrorAddendum(),
        );
      }
    }
  }
}

Domain

Subdomains

Frequently Asked Questions

What does checkSelectPropTypes() do?
checkSelectPropTypes() is a function in the react codebase, defined in packages/react-dom-bindings/src/client/ReactDOMSelect.js.
Where is checkSelectPropTypes() defined?
checkSelectPropTypes() is defined in packages/react-dom-bindings/src/client/ReactDOMSelect.js at line 36.
What does checkSelectPropTypes() call?
checkSelectPropTypes() calls 1 function(s): getDeclarationErrorAddendum.
What calls checkSelectPropTypes()?
checkSelectPropTypes() is called by 1 function(s): validateSelectProps.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free