Open dvail opened 6 months ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has been automatically marked as stale because it has not had recent activity.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Describe the problem
As titled, when using the tree view table variant if an empty string is passed as a child of a cell, React will throw an error during rendering:
With some local debugging I suspect the issue stems from this line, which unintentionally returns an object when
object.title
is falsy.How do you reproduce the problem?
It looks like CodeSandbox no longer allows public links on a free account, but the following minimal snippet will reproduce the issue:
This impacts at least as far back as
@patternfly/react-table : 4.112.39
as well aslatest
.Expected behavior The table renders an empty string without a runtime error.
Is this issue blocking you? No - the workaround is to guard for empty strings when rendering a tree view Table and provide an alternative value.
Screenshots