* Validation function for `value` and `defaultValue`. * @private
(inst, props)
| 8222 | * @private |
| 8223 | */ |
| 8224 | function checkSelectPropTypes(inst, props) { |
| 8225 | var owner = inst._currentElement._owner; |
| 8226 | LinkedValueUtils.checkPropTypes('select', props, owner); |
| 8227 | |
| 8228 | if (props.valueLink !== undefined && !didWarnValueLink) { |
| 8229 | "development" !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0; |
| 8230 | didWarnValueLink = true; |
| 8231 | } |
| 8232 | |
| 8233 | for (var i = 0; i < valuePropNames.length; i++) { |
| 8234 | var propName = valuePropNames[i]; |
| 8235 | if (props[propName] == null) { |
| 8236 | continue; |
| 8237 | } |
| 8238 | if (props.multiple) { |
| 8239 | "development" !== 'production' ? warning(Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0; |
| 8240 | } else { |
| 8241 | "development" !== 'production' ? warning(!Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0; |
| 8242 | } |
| 8243 | } |
| 8244 | } |
| 8245 | |
| 8246 | /** |
| 8247 | * @param {ReactDOMComponent} inst |
no test coverage detected
searching dependent graphs…