components icon indicating copy to clipboard operation
components copied to clipboard

[Accordion] You cannot change the open state of an accordion item using the `open` property

Open jpzwarte opened this issue 1 year ago โ€ข 1 comments

Provide a general summary of the issue here

A user used the open property to change the open/closed state of the accordion. This did not work, since the component only checks the open property on initial render. Instead the user needed to use the toggle() method.

Extracted from #1418

๐Ÿค” Expected Behavior?

This "mistake" is probably not the last time we see this. Consider changing accordion-item to also work given the above usecase.

๐Ÿ˜ฏ Current Behavior

๐Ÿ’ Possible Solution

No response

๐Ÿ–ฅ๏ธ Steps to Reproduce

What browsers are you seeing the problem on? (only for bugs in code)

Chrome

If other, please specify.

No response

What operating system are you using?

macOS

๐Ÿงข Your product/team

SLDS

๐ŸŽจ Your Theme(s)

Sanoma Learning

jpzwarte avatar Jul 17 '24 10:07 jpzwarte

The problem seems to be with ?open=state, this doesn't work with the removing of the attribute in the component. In angular with [open]="state" it does work

Diaan avatar Aug 01 '24 14:08 Diaan