At present, the Table component will throw an error if it has a null or undefined child, due to the property access I've altered. By using optional chaining, this should no longer cause an issue.
I ran into this when I used an optional boolean argument to conditionally render a header. Not having a header also causes an issue with rendering the table's top border, so I also tweaked the rendering of TableBody to mitigate that.
At present, the
Table
component will throw an error if it has anull
orundefined
child, due to the property access I've altered. By using optional chaining, this should no longer cause an issue.I ran into this when I used an optional boolean argument to conditionally render a header. Not having a header also causes an issue with rendering the table's top border, so I also tweaked the rendering of TableBody to mitigate that.