Skip to content

[Bug]: with-layer stories do not respond to controls beyond first layer #20095

@heloiselui

Description

@heloiselui

Package

@carbon/web-components

Browser

No response

Package version

Last

React version

No response

Description

While testing cds-content-switcher as part of the parity work with React, I noticed that the with layer story in the Content Switcher is not functioning correctly. The PR for parity hasn't been merged yet, so you may not be able to verify it immediately.

Only the controls within the first layer are functional. Nested layers do not respond to control updates, such as changes to size, selectedIndex, etc. Unlike in the React version, where all the layer updates .

This behavior appears to be related to how Layer component (sb-template-layers). Further investigation may be required to fully understand and resolve the issue.

Reproduction/example

https://web-components.carbondesignsystem.com/?path=/story/components-content-switcher--icon-only-with-layer

Steps to reproduce

  1. Go to the WC Storybook - Deploy-preview: Content SwitcherIcon Only With Layer
  2. Try changing the selected item using the selectedIndex or size in the controls in storybook
  3. Only the first (outermost) switcher updates; the inner ones remain static
  4. Compare with the React implementation — all layers respond correctly
Screen.Recording.2025-08-05.at.17.03.15.mov

Suggested Severity

Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.

Application/PAL

No response

Code of Conduct

Metadata

Metadata

Type

Severity

None yet

Projects

Status
✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions