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
{{ message }}
This repository has been archived by the owner on May 10, 2019. It is now read-only.
Seems like a row with tableHeading is required, even if not needed at all.
2 Table throws an error if there are now rows
If there are no data rows (table is empty or has only heading) Table throws an error that it cannot call forEach:
<Table></Table>
Expected
Table component (especially if meant to be used as simple static component) shouldn't make the assumptions about existence of it's children.
If I call <Table></Table> I expect empty table to be rendered. If some rows are required for some reason that should at least clearly warn/error about it in the console (not throw a JS error).
Ideally tableHeading should not be needed by the table. It's weird to be using hasHeading on a Table to hide heading row. Especially that it's still required in the markup.
The text was updated successfully, but these errors were encountered:
I tried to use
Table
component to render a static table and found it quite hard to use and debug.It seems to be making a lot of assumptions about children nodes.
1 Table doesn't render if there is no header row.
If there are only data rows (no heading) table just silently doesn't render at all:
Seems like a row with
tableHeading
is required, even if not needed at all.2 Table throws an error if there are now rows
If there are no data rows (table is empty or has only heading) Table throws an error that it cannot call
forEach
:Expected
Table component (especially if meant to be used as simple static component) shouldn't make the assumptions about existence of it's children.
If I call
<Table></Table>
I expect empty table to be rendered. If some rows are required for some reason that should at least clearly warn/error about it in the console (not throw a JS error).Ideally
tableHeading
should not be needed by the table. It's weird to be usinghasHeading
on aTable
to hide heading row. Especially that it's still required in the markup.The text was updated successfully, but these errors were encountered: