Skip to content

Expandable props.children shouldn't be required #4413

@christianvogt

Description

@christianvogt

Describe the issue. What is the expected and unexpected behavior?

Expandable props.children is a required prop. As such react will warn if a value of null is supplied. In a situation where we want to lazy load the contents and therefore have no children to render at the time the section is collapsed, we cannot pass null without getting a warning.

(we are still using v3, but I suspect it's the same for ExpandableSection in v4)

image

Is this a bug or enhancement? If this issue is a bug, is this issue blocking you or is there a work-around?
bug

Work around is to supply an empty react fragment instead of null.

What is your product and what release version are you targeting?
OpenShift Console 4.6

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions