I am using Material UI for the React Components. See the below code and see how I am binding the Tooltip title property.
<Tooltip disableFocusListener title={xyzStore.mytestMultiLineContent} >
<span>
<Button color={'primary'} variant={'contained'}
onClick={this.handleXYZ}
disabled={!xyzStore.canSaveXYZ}
>
<Icon fontSize={'small'} >{'save'}</Icon>
<Typography variant={'button'} >{'Save XYZ'}</Typography>
</Button>
</span>
</Tooltip>
The property mytestMultiLineContent contains multiline data for e.g.
"Reason is:
I am good
I am bad
I am ugl"
Since the data is set to title property it will be encoded out. Is there a way to achieve multi line string data to be displayed on Tooltip?
https://material-ui.com/api/tooltip/
I found that the
titleprops type isNode.It means you can use
HTMLtags like this