Describe the bug
If I add a custom render function to the "Search" icon prop, two warnings will appear in the console.
To Reproduce
Steps to reproduce the behavior:
https://codesandbox.io/embed/blissful-sky-8w5th
Expected behavior
The console stays clear of errors.
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Most helpful comment
@Flixbox,
This is not a bug. Actually React.forwardRef required after mui4.0.0 upgrade. So if you change you icon usage like this it will be resolved:
icons={{
Search: React.forwardRef((props, ref) =>
}}
All 4 comments
Hi @Flixbox ,
Thanks for clear issue. I will take a look at this asap.
@Flixbox,
This is not a bug. Actually React.forwardRef required after mui4.0.0 upgrade. So if you change you icon usage like this it will be resolved:
icons={{
Search: React.forwardRef((props, ref) =>
}}
@mbrn I know this is not a bug, and the issue is closed - but I ran into this and could not fix it with your proposed solution. So I figured it may be valuable to give more detail on your fix.
I tried this (typescript):
But the error still shows up. Any idea what I did wrong? I thought this is your solution.
Can you try this: