Skip to content

Accordion Fragment Error with React 19 #299

Description

@LaurenAllin

Describe the bug

I am receiving this error on the Accordion component after updating from React 18 to 19: "Invalid prop data-headlessui-state supplied to React.Fragment. React.Fragment can only have key and children props."

Gemini thinks that the issue is related to passing a fragment to the element, which is no longer allowed in React 19. https://github.com/USACE/groundwork/blob/main/lib/components/display/accordion.jsx.

I think the specific issue is on Line 24 "<>". Replacing the <></> with a

tag may fix the issue, or adding an as="div" to the Disclosure tag. I haven't tried either, however.

REDACTED relevant log output

Steps to Reproduce

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions