At using the MenuOption inside a Menu component, the onClick is automatically attached and linked with the onChange event of the Menu component, so adding it is not necessary and also won't work, because the onClick will be replaced by the default onChange event in Menu component.
MenuHeader
Props
Data Type
Required
children
string
β
MenuDivider
It has no props or any configuration.
Example:
Menu generated with previous structure
onChange
At clicking one the options inside the Menu component, automatically the onChange function event is going to be triggered, allowing developer to execute a custom function that is going to receive as a default param the value of the selected item.
Components Dependency
For this component elaboration there were used the following internal components: