Skip to content

[Bug]: <Stack /> removes all non-ReactElement children while rendering #25653

Description

@jeffswt

Library

React / v8 (@fluentui/react)

System Info

All @fluentui/react versions since commit 277d440d579167614823f740f58758f05cb40ca2.

Are you reporting Accessibility issue?

No response

Reproduction

See bug description below.

Bug Description

Actual Behavior

For the code below, only 'AAA' is shown in the rendered HTML.

<Stack horizontal>
    <span>AAA</span>
    bbb
</Stack>

Expected Behavior

The rendered HTML is expected to produce AAAbbb as an output.

We've identified this issue as a change introduced in commit 277d440d579167614823f740f58758f05cb40ca2, that _processStackChildren had missed out Stack children that are not React elements.

Is this change intended?

Logs

No response

Requested priority

Blocking

Products/sites affected

We discovered this issue before rolling out our website to Production.

Are you willing to submit a PR to fix?

depends. i don't currently have a raw testing environment just for fluentui.

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions