fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

[Bug]: TooltipHost onRenderContent passing undefined on latest releases

Open thoffmann-fms opened this issue 2 years ago • 3 comments

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.

thoffmann-fms avatar Jul 27 '22 12:07 thoffmann-fms

Your codepen demo is failing due to errors with the Text component.

micahgodbolt avatar Aug 22 '22 18:08 micahgodbolt

Thanks, any idea what the error is? That code is a copy/paste from the production code.

thoffmann-fms avatar Aug 22 '22 20:08 thoffmann-fms

Gentle ping that this issue needs attention.

msft-fluent-ui-bot avatar Sep 19 '22 12:09 msft-fluent-ui-bot

Hi, this is still broken in 8.98.4.

thoffmann-fms avatar Oct 21 '22 14:10 thoffmann-fms

Thank you. Just tested with 8.103.1 and the tooltips are working as expected.

thoffmann-fms avatar Nov 23 '22 13:11 thoffmann-fms