in ReactJS Material-UI? I am using http://www.material-ui.com/#/components/dropdo...">

How to recognize the main text of the selected <MenuItem / "> in ReactJS Material-UI?

I am using http://www.material-ui.com/#/components/dropdown-menu and I would like to configure the log primaryText console from <MenuItem/>. How can i do this?

+4
source share
1 answer

use onChange(event: object, key: number, value: any)function.

The event object has information about the selected item.

you can try

console.log(event.target.textContent)
0
source

Source: https://habr.com/ru/post/1651704/


All Articles