Skip to content
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

Modal cannot be given "as". #2731

Closed
jlVidal opened this issue Apr 21, 2018 · 2 comments
Closed

Modal cannot be given "as". #2731

jlVidal opened this issue Apr 21, 2018 · 2 comments

Comments

@jlVidal
Copy link

jlVidal commented Apr 21, 2018

✔ 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

@welcome
Copy link

welcome bot commented Apr 21, 2018

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@levithomason
Copy link
Member

This is correct. Let's keep #2306 as the main thread for this. Closing as a duplicate.

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

No branches or pull requests

2 participants