fluentui
fluentui copied to clipboard
[Bug]: TooltipHost onRenderContent passing undefined on latest releases
Library
React / v8 (@fluentui/react)
System Info
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
System:
OS: Windows 10 10.0.19044
CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
Memory: 10.34 GB / 31.68 GB
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.71)
Internet Explorer: 11.0.19041.1566
Are you reporting Accessibility issue?
No response
Reproduction
https://codepen.io/timhoffmann/pen/WNzZJpv?editors=1111
Bug Description
<TooltipHost content={item.description} tooltipProps={{ onRenderContent: this.renderToolTip }}> <Text nowrap={true} block={true} variant="small" style={{ color: fmsEmpTheme.palette.themePrimary, cursor: "help" }} > <div dangerouslySetInnerHTML={dangerousDesc} /> </Text> </TooltipHost>
...
private renderToolTip = (a: ITooltipProps): JSX.Element => {
Actual Behavior
At react 8.83.0 it works as expected. At version 8.84.0+ the parameter passed to the render method is undefined.
Expected Behavior
iTooltipProps parameter should have a value
Logs
No response
Requested priority
Normal
Products/sites affected
No response
Are you willing to submit a PR to fix?
no
Validations
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] The provided reproduction is a minimal reproducible example of the bug.
Your codepen demo is failing due to errors with the Text component.
Thanks, any idea what the error is? That code is a copy/paste from the production code.
Gentle ping that this issue needs attention.
Hi, this is still broken in 8.98.4.
Thank you. Just tested with 8.103.1 and the tooltips are working as expected.