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

Custom Menu Example (on the docs) wont work in v 3.0.0 #4020

Closed
Abenezer opened this issue Nov 22, 2019 · 1 comment · Fixed by #4023
Closed

Custom Menu Example (on the docs) wont work in v 3.0.0 #4020

Abenezer opened this issue Nov 22, 2019 · 1 comment · Fixed by #4023
Assignees

Comments

@Abenezer
Copy link

Abenezer commented Nov 22, 2019

Expected
Custom menu example to work
What happened instead:
Error: Expected ref to be a function, a string, an object returned by React.createRef(), or null.

Steps to reproduce:
Just Copy the custom menu example

I am guessing something to do with forwardRef and react router
Environment

  • React-admin version: 3.0.0
  • React version: 16.12
  • Browser: chrome
  • Stack trace (in case of a JS error):
    react-dom.development.js:14792 Uncaught Error: Expected ref to be a function, a string, an object returned by React.createRef(), or null.
@Abenezer
Copy link
Author

Abenezer commented Nov 22, 2019

ok after hours of searching (and looking at the source of the original Menu.js) i found the problem to be the left Icon property
it seems it only accepts materialized components
leftIcon={LabelIcon} wont work
leftIcon={<LabelIcon/>} works

if this is the official solution update the docs and close this issue

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