简体   繁体   English

道具类型失败:提供给“ForwardRef(InputBase2)”的“符号”类型的道具“类型”无效,应为“字符串”

[英]Failed prop type: Invalid prop `type` of type `symbol` supplied to `ForwardRef(InputBase2)`, expected `string`

Material UI TextField is causing this error. Material UI TextField 导致此错误。 I have the prop of type set to password like this我将类型的道具设置为密码,如下所示

type="password"

It is not working as it is not hiding the field in the browser and causing the error in the console.它不起作用,因为它没有在浏览器中隐藏该字段并导致控制台中出现错误。 What is this type "Symbol" anyways这种类型的“符号”到底是什么

Solved it!解决了! the prop "InputProp" was causing the issue.道具“InputProp”导致了这个问题。 if it's null, it causes that issue.如果它为空,则会导致该问题。 I was dynamically setting it so it was null at some points我是动态设置的,所以在某些时候它是空的

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Mui5 TextField 提供给“ForwardRef(InputBase)”的“boolean”类型的无效道具“autoComplete”,应为“字符串” - Mui5 TextField Invalid prop `autoComplete` of type `boolean` supplied to `ForwardRef(InputBase)`, expected `string` reactjs 失败的道具类型:提供给“ForwardRef(IconButton)”的“object”类型的无效道具“className”,应为“string” - reactjs Failed prop type: Invalid prop `className` of type `object` supplied to `ForwardRef(IconButton)`, expected `string` 道具类型失败:提供给“ForwardRef(TablePagination)”的“string”类型的道具“count”无效,应为“number” - Failed prop type: Invalid prop `count` of type `string` supplied to `ForwardRef(TablePagination)`, expected `number` 警告:道具类型失败:提供给“ForwardRef(FormControl)”的“string”类型的道具“error”无效,预期为“boolean” - Warning: Failed prop type: Invalid prop `error` of type `string` supplied to `ForwardRef(FormControl)`, expected `boolean` 警告:道具类型失败:提供给“ForwardRef(Dialog)”的“function”类型的无效道具“open”,应为“boolean”。 在对话框 - Warning: Failed prop type: Invalid prop `open` of type `function` supplied to `ForwardRef(Dialog)`, expected `boolean`. at Dialog 失败的道具类型:提供给“ForwardRef(Grid)”的无效道具“children” - Failed prop type: Invalid prop `children` supplied to `ForwardRef(Grid)` 失败的道具类型:提供给“ForwardRef(Grid)”的无效道具“lg” - Failed prop type: Invalid prop `lg` supplied to `ForwardRef(Grid)` 道具类型失败:提供给“ForwardRef(DataGrid)”的“object”类型的无效道具“rows”,预期为“array” - Failed prop type: Invalid prop `rows` of type `object` supplied to `ForwardRef(DataGrid)`, expected `array` React Native SearchBar错误:道具类型失败:提供给`ForwardRef(TextInput)`的`array`类型的无效道具`value`,预期`string` - React Native SearchBar Error: Failed prop type: Invalid prop `value` of type `array` supplied to `ForwardRef(TextInput)`, expected `string` index.js:1 警告:道具类型失败:提供给“ForwardRef(Avatar)”的“object”类型的道具“src”无效,预期为“string” - index.js:1 Warning: Failed prop type: Invalid prop `src` of type `object` supplied to `ForwardRef(Avatar)`, expected `string`
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM