![](/img/trans.png)
[英]How do I change the text color of a selected MenuItem in material-ui?
[英]How to recognize the primary text of selected <MenuItem/> in ReactJS Material-UI?
我正在使用http://www.material-ui.com/#/components/dropdown-menu ,我想控制日志選擇<MenuItem/>
的primaryText。 我怎么能這樣做?
使用onChange(event: object, key: number, value: any)
函數。
事件對象具有有關所選項的信息。
你可以嘗試
console.log(event.target.textContent)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.