Skip to content

Popover would not display if content use Fragment tag #26517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
Rey-Wang opened this issue Sep 1, 2020 · 3 comments · Fixed by #26534
Closed
1 task done

Popover would not display if content use Fragment tag #26517

Rey-Wang opened this issue Sep 1, 2020 · 3 comments · Fixed by #26534

Comments

@Rey-Wang
Copy link

Rey-Wang commented Sep 1, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. Use <Fragment> or <> package your popover content
  2. Click or hover popover (depends on how you define trigger)

What is expected?

expected to show popover

What is actually happening?

nothing happen and no errer throwed

Environment Info
antd 4.6.2
React 16.12
System codesandbox
Browser chrome 79
@richard-li-next
Copy link

I and @Rey-Wang are from the same team. In the antd3.x version, Popover's children type is children?: React.ReactNode, but in the antd4.x version its type is changed to children?: React.ReactElement. So we had to wrap it with a layer of <></>.

afc163 added a commit that referenced this issue Sep 2, 2020
afc163 added a commit that referenced this issue Sep 2, 2020
afc163 added a commit that referenced this issue Sep 2, 2020
afc163 added a commit that referenced this issue Sep 2, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
close #26517
@Rey-Wang
Copy link
Author

Rey-Wang commented Sep 2, 2020

@afc163 Even we fix the type that we can add muti-child in Popover, there still has a problem with the <></> or <Fragment></Fragment
I don't think this issue should be closed

@giovannipds
Copy link

It's possible to just use a div to make that work (instead of Fragment/</>)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants