Skip to content

Support single child in InputGroup (#714) - #724

Merged
bedrich-schindler merged 1 commit into
masterfrom
task/714
Aug 24, 2026
Merged

Support single child in InputGroup (#714)#724
bedrich-schindler merged 1 commit into
masterfrom
task/714

Conversation

@bedrich-schindler

Copy link
Copy Markdown
Contributor

InputGroup crashed when a single child was passed because it called children.reduce() directly, assuming an array. Normalize children with React.Children.toArray() before resolving the validation state.

Cover the children prop with visual tests for both a single node and multiple nodes, and make InputGroupForTest accept custom children while keeping the current composition as the default.

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-24 08:05 UTC

`InputGroup` crashed when a single child was passed because it called
`children.reduce()` directly, assuming an array. Normalize `children`
with `React.Children.toArray()` before resolving the validation state.

Cover the `children` prop with visual tests for both a single node and
multiple nodes, and make `InputGroupForTest` accept custom `children`
while keeping the current composition as the default.
@bedrich-schindler
bedrich-schindler merged commit ccf2101 into master Aug 24, 2026
14 checks passed
@bedrich-schindler
bedrich-schindler deleted the task/714 branch August 24, 2026 08:05
@adamkudrna adamkudrna linked an issue Aug 24, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InputGroup should allow one element only

3 participants