Skip to content

Modal cannot be given "as". #2731

@jlVidal

Description

@jlVidal

✔ BUGS → This form is required:

FIX seems to be a "TODO" commented here:

// TODO: remove when ref with "as" is resolved: PR #2306

Steps
<Modal defaultOpen={true} as={(props) => <div {...props} />} />

Expected Result
Should work without throwing an error.

Actual Result

index.js:2178 Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail.

Check the render method of `Modal`.
    in as (created by Modal)

Version
0.78.2

Testcase

Sample

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions