0
我正在學習ReactJS,並且我構建了一個AppBar
並在其中添加了一個TextField
。它工作完美。下面是我的代碼:ReactJS - AppBar中的自動完成材料UI
class Test extends React.Component {
render() {
return (
<MuiThemeProvider>
<AppBar
title={"Benchmarking"}
iconElementLeft={<IconButton iconClassName="muidocs-icon-custom-github" />}
iconElementRight={
<div>
<TextField
hintText='this is a sample text'
/>
</div>
}
/>
</MuiThemeProvider>
)
}
}
現在我想的地方添加AutoField
的TextField
,其不扔任何錯誤,但AppBar
不顯示。可能是什麼問題?請幫助。
我的壞。我努力嘗試使用狀態參數。非常感謝。 – Jeril