primitives icon indicating copy to clipboard operation
primitives copied to clipboard

fix: removes redundent isOpen check in collapsable menu that is preventing users from customizing behaviour

Open FredrikMWold opened this issue 1 year ago • 0 comments

Description

The current implementation has both: hidden={!isOpen} {isOpen && children}

Not being able to control how collapsable content is shown, can cause issues when combining it with forms. If you have form fields inside a collapsable element, the fields can end up not being mounted to the dom when the form is submitted, causing the fields not to be included in form data.

I dont think this is a very common use case so I dont think this needs a custom solution, but allowing the user to control the behaviour by targeting the data-state attribute, would be a good middleground.

FredrikMWold avatar Apr 15 '24 11:04 FredrikMWold