atk / solid-blocks

UI building blocks for SolidJS.
https://atk.github.io/solid-blocks/
81 stars 2 forks source link

UX on <AccordionGroup> 's "allowMultiple" property #13

Open dennismok2018 opened 1 year ago

dennismok2018 commented 1 year ago

I was just playing around on the demo of <AccordionGroup>

  1. Enable 'allowMultiple'
  2. Open >1 Accordions
  3. Disable 'allowMultiple'
  4. Now we get 3 behaviours: -a : cannot close already opened Accordions -b: can open new accordions but newly opened Accordions cannot be closed as the others -c: if a newly opened one is the last unopened one on the list, every opened Accordion are then closed and only the last opened one stay open (I think only this intuitively should be the default behaviour after we get rid of 'allowMultiple' and back to default)

    P.S. Not sure how one would get there in real-life application except tinkering with the demo like me so might not actually be a bug

atk commented 1 year ago

Changing the properties while the accordions are rendered is currently considered not a use case. However, I might reconsider this behavior if I get reports of this breaking real-life apps.