【发布时间】:2020-11-28 13:59:52
【问题描述】:
SelectInput.js:342
Material-UI:您为选择组件提供了超出范围的值undefined。
考虑提供与可用选项之一或“”匹配的值。
可用的值为:
`All`, `Software development`, `Quality Assurance`, `Web,Graphic design`, `Product,Project Management`, `Hardware design`, `Other IT`, `Sales`, `Administrative`, `Tourism`, `Marketing,Advertising`, `Journalism,PR`, `Accounting,Bookkeeping`, `Finance Management`, `Banking,credit`, `TV,Radio`, `Education,training`, `Legal`, `Audit,Compliance`, `Healthcare,Pharmaceutical`, `Human Resources`.
我不知道为什么会出现这个错误,因为我正在传递选择一个字符串,该字符串是对象中的单词之一
javascript:
setFieldValue(decodeURI(location.pathname.substring(location.pathname.lastIndexOf('_') + 1)))
字段值始终为字符串且正常,但材质 UI 会抛出此错误。
如果您有一些问题想更好地了解我的问题,请询问
【问题讨论】:
标签: javascript reactjs material-ui