相关疑难解决方法(0)

Material UI React 无法识别 DOM 元素上的“underlineStyle”道具

我已经按照示例代码为材质 UI TextField 元素的下划线颜色设置样式。

http://www.material-ui.com/#/components/text-field

但是,当我尝试添加自己的样式时,React 无法识别此属性。

<TextField type="number" id="Commission" label="Commission" underlineStyle={{borderColor : orange500}} fullWidth /> 
Run Code Online (Sandbox Code Playgroud)

我在 chrome 开发者控制台中收到以下错误消息

warning.js:33 Warning: React does not recognize the `underlineStyle` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `underlinestyle` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
    in div (created by FormControl)
    in FormControl (created by WithStyles(FormControl))
    in WithStyles(FormControl) (created …
Run Code Online (Sandbox Code Playgroud)

javascript reactjs material-ui

7
推荐指数
2
解决办法
1万
查看次数

标签 统计

javascript ×1

material-ui ×1

reactjs ×1