components
components copied to clipboard
[Accordion] You cannot change the open state of an accordion item using the `open` property
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
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