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

Add forwardRef to defaultStyle #411

Open
jpalumickas opened this issue Jun 29, 2020 · 1 comment · May be fixed by #477
Open

Add forwardRef to defaultStyle #411

jpalumickas opened this issue Jun 29, 2020 · 1 comment · May be fixed by #477

Comments

@jpalumickas
Copy link

After upgrading to 4.0.0, when we try to use ref with MentionsInput, to access MentionsInput functions, we this error:

Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

Steps to reproduce:

  1. Add ref to MentionsInput

Expected behaviour:

Allow to use ref with MentionsInput to access class functions

Observed behaviour:

Error written above

Workaround:

Add forwardRef to defaultStyle might help

@jfschwarz
Copy link
Contributor

Yes, this would make sense. Glad to accept a PR, otherwise we're going to add this once we find a moment...

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

Successfully merging a pull request may close this issue.

2 participants