-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap Tooltip content in <div> for non string content type (#17593)
#### Pull request checklist - [x] Addresses an existing issue: Fixes #17344 - [x] Include a change request file using $ yarn change #### Description of changes See the issue thread for more context. If a JSX object with a `<div>` other than a string is passed into the content field of a `TooltipHost` / `Tooltip`, the browser will complain with the following error: > Warning: validateDOMnesting(...): `<div>` cannot appear as a descendant of `<p>`... To deal with this error, we should only wrap the object in `<p>` if it is type string, otherwise we can wrap it in a `<div>`
- Loading branch information
Showing
3 changed files
with
13 additions
and
2 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-4c61963a-f0bd-47ee-bcfb-3ca4307ac376.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "Wrap Tooltip content in div when type is not string", | ||
"packageName": "@fluentui/react", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters