I am trying to build a table component on top of the Material table but nothing is being rendered because table expects
The error that is displayed is:
Material-UI: Children of the Table component must be TableBody or TableHeader or TableFooter.
Nothing is rendered.
Gist https://gist.github.com/Foxhoundn/f43adfd777a9c40161355964d8fbe9d4
Did you look at Table to see where the error might originate? As a programmer, the source code is your friend. Go open-source! :tada:
YourHOC.muiName = 'TableHeader';
People have been facing the same issue with the <AppBar /> component: #5053.
That's the same story.
You need to interoperate in a transparent way.
muiName properties to the prototype of your wrapping component.With those two steps, that should work. Feel free to submit the solution once you have it.
Hopefully, that can help others.
Most helpful comment
Did you look at Table to see where the error might originate? As a programmer, the source code is your friend. Go open-source! :tada:
YourHOC.muiName = 'TableHeader';