You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the createElement implementation, I noticed that for some reason the tbody and td elements were not working. When I set the th element to use the same component I was setting the td to, I noticed that the th would render just fine.
Also, if I removed the createElement implementation and used the overrides object, tbody and td would render properly. Here is an example:
createElement(type, props, children) {
switch (type) {
case "table":
return <Table {...props}>{children}</Table>
case "thead":
return <TableHead {...props}>{children}</TableHead>
case "tbody":
return <TableBody {...props}>{children}</TableBody>
case "tr":
return <TableRow {...props}>{children}</TableRow>
case "td":
case "th":
return <TableCell {...props}>{children}</TableCell>
default:
return createElement(type, props, children);
}
}
So in your createElement function you will need to collect all the children back into an array and then spread them again when you delegate to React.CreateElement.
When using the createElement implementation, I noticed that for some reason the
tbody
andtd
elements were not working. When I set theth
element to use the same component I was setting thetd
to, I noticed that theth
would render just fine.Also, if I removed the createElement implementation and used the overrides object,
tbody
andtd
would render properly. Here is an example:The above code will render the following HTML:
If I remove the createElement implementation and use the overrides object, the
tbody
andtd
will render properly.Here is an example:
This will render the following HTML:
The text was updated successfully, but these errors were encountered: