Skip to content

Popover would not display if content use Fragment tag #26517

Closed
@Rey-Wang

Description

@Rey-Wang
  • 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

Activity

richard-li-next

richard-li-next commented on Sep 1, 2020

@richard-li-next

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 <></>.

added a commit that references this issue on Sep 2, 2020
6915b88
added 2 commits that reference this issue on Sep 2, 2020
7af4d38
b78e230
added a commit that references this issue on Sep 2, 2020
bc950d9
Rey-Wang

Rey-Wang commented on Sep 2, 2020

@Rey-Wang
Author

@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

giovannipds commented on Jun 1, 2022

@giovannipds

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @giovannipds@Rey-Wang@richard-li-next

      Issue actions

        Popover would not display if content use Fragment tag · Issue #26517 · ant-design/ant-design