I have a Material UI chip where I want to read the text within it when I click that chip. My code so far is below:
<Chip
label={name1}
color="primary"
variant="outlined"
onMouseOver={(event) =>
board.current.addMarker('e4', {
class: 'emphasize',
slice: 'marker3',
})
}
onMouseLeave={(event) => board.current.removeMarkers(undefined, undefined)}
onClick={(event) => alert(event.target.value)}
/>
My onClick event is not picking up the chips value. Where am I going wrong?