Skip to content
This repository was archived by the owner on Mar 6, 2025. It is now read-only.

Commit 0a85099

Browse files
Merge pull request #130 from Ultimaker/STAR-335-improve-InputFieldWrapper
only show input field children if they have content
2 parents a2b18ea + c5240e1 commit 0a85099

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/input_fields/input_field_wrapper.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ export class InputFieldWrapper extends React.Component<InputFieldWrapperProps, {
126126

127127
private _renderInputChildren(): JSX.Element {
128128
const { inputChildren } = this.props;
129-
if (inputChildren) {
129+
const displayChildren = React.Children.toArray(inputChildren).length > 0;
130+
131+
if (displayChildren) {
130132
return (
131133
<div className="layout__item u-fit input-children">
132134
{inputChildren}

0 commit comments

Comments
 (0)