You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
List.AccordionGroup ignores a controlled expandedId of 0 #5144
When List.AccordionGroup is controlled and expandedId is the number 0, no accordion expands. The accordion with id={0} stays collapsed, even though id={0} is supported since #3936.
ListAccordionGroup resolves the expanded ID with expandedIdProp || expandedId. Because 0 is falsy, the group falls back to its internal state, which is never updated in controlled mode.
Expected behaviour
The accordion whose id matches the controlled expandedId expands, including when the ID is 0.
Numeric 0 is a valid ID here, but the current truthy fallback drops it. I checked current main and confirmed ListAccordionGroup.tsx still uses expandedIdProp || expandedId.
A regression test could mount the group controlled with expandedId={0} and assert the first row is expanded before any press; then drive the parent to 1 through onAccordionPress and assert the second row opens. That covers both the numeric-zero fallback and the controlled callback round-trip.
Activity
dave-otf commentedon Oct 26, 2026
Numeric
0is a valid ID here, but the current truthy fallback drops it. I checked currentmainand confirmedListAccordionGroup.tsxstill usesexpandedIdProp || expandedId.A regression test could mount the group controlled with
expandedId={0}and assert the first row is expanded before any press; then drive the parent to1throughonAccordionPressand assert the second row opens. That covers both the numeric-zero fallback and the controlled callback round-trip.