Skip to content

fix(list): expand accordion with id 0 in a controlled AccordionGroup - #5205

Merged
Doberjohn merged 1 commit into
5.0from
@Doberjohn/5.0-accordion-group-id-zero
Nov 10, 2026
Merged

Doberjohn merged 1 commit into
5.0from
@Doberjohn/5.0-accordion-group-id-zero

Conversation

@Doberjohn

Copy link
Copy Markdown
Collaborator

Motivation

On 5.x, a controlled List.AccordionGroup with expandedId={0} doesn't expand the accordion with id={0}, because expandedIdProp || expandedId treats 0 as unset.

Related issue

Port of #5145
Fixes #5144 on 5.x

Screenshots / Videos

None needed: a one-line change with a test.

Test plan

  1. New test in ListAccordion.test.tsx (the one from fix(list): expand accordion with id 0 in a controlled AccordionGroup #5145, in 5.0's test style): with expandedId={0}, the accordion with id={0} is expanded and the other one isn't. It fails on 5.0 without the change.
  2. yarn typescript, yarn lint-no-fix and yarn test pass.

Port of #5145 to 5.0.

Co-authored-by: Raphael Fakhri <rjf11@mail.aub.edu>
@Doberjohn Doberjohn added this to the 5.15.5 milestone Nov 10, 2026
@github-actions

Copy link
Copy Markdown

Found potential problems with the pull request:

  • Screenshot or video evidence is missing. Make sure to include one if it affects the UI.

@Doberjohn
Doberjohn merged commit 8f97e66 into 5.0 Nov 10, 2026
8 checks passed
@Doberjohn
Doberjohn deleted the @Doberjohn/5.0-accordion-group-id-zero branch November 10, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant