Skip to content

withPortal causes an extra wrapper <div> #5499

@mindplay-dk

Description

@mindplay-dk

Why the extra wrapper <div> here?

react-datepicker/src/index.tsx

Lines 1490 to 1493 in 386fce0

<div>
{this.renderInputContainer()}
{portalContainer}
</div>

It messed up my CSS.

This was added 9 years ago so maybe this was just a rugged way to group the returned elements, before <> fragments </> were a thing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions