codegouvfr / codegouvfr/react-dsfr

accordion group inconsistent callback value

Open
#194 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
496
Forks
99
Avg merge
15h 36m
Merged PRs (30d)
4

Description

Trying to work with an accordion group in controlled mode but having issues getting the right value on the `onExpandedChange` callback.

https://stackblitz.com/edit/nextjs-hu1mpy?file=app%2Fpage.tsx

If i click on Accordion 1 then Accordion 2 then Accordion 1 then Accordion 2
i should expect to always have `expanded = true` in the `onExpandedChange` callback right?

right now it would show `true, true, false, false`

is this the expected behaviour ?

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.