You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the Typography component and add an editable object to it.
Make the icon of the editable object be different, when something changes.
What is expected?
The Icon should switch or disappear, depending on what you provide as icon.
What is actually happening?
The icon never switches/shows up.
Environment
Info
antd
5.16.1
React
18.x
System
Linux
Browser
Firefox 124.0.1
When I wrap the children of the Typography component into a span element for example, everything seems to work.
In "/components/typography/Base/index.tsx" in line 400, I see that the icon is wrapped by a Tooltip. So maybe the Tooltip component has an issue with changing children on the fly or something like that. Also, this only happens, when the children is a primitive type. As soon as I change it to a more complex type, it seems to work as well. For example
<Typography{...}>{test}</Typography>
When test is a string for example, the issue is happening.
<Typography{...}>abc{test}</Typography>
Theissue is nothappening.<!--generatedbyant-design-issue-helper.DONOTREMOVE-->
The text was updated successfully, but these errors were encountered:
Reproduction link
Steps to reproduce
What is expected?
The Icon should switch or disappear, depending on what you provide as icon.
What is actually happening?
The icon never switches/shows up.
When I wrap the children of the Typography component into a
span
element for example, everything seems to work.In "/components/typography/Base/index.tsx" in line 400, I see that the icon is wrapped by a
Tooltip
. So maybe theTooltip
component has an issue with changingchildren
on the fly or something like that. Also, this only happens, when the children is a primitive type. As soon as I change it to a more complex type, it seems to work as well. For exampleWhen
test
is a string for example, the issue is happening.The text was updated successfully, but these errors were encountered: