primitives icon indicating copy to clipboard operation
primitives copied to clipboard

[Accordion] layout shift with initial open items.

Open jinwoo0103 opened this issue 9 months ago • 4 comments

Bug report

Current Behavior

Can check layout shift when click (Command + Shift + R) on Accordion documentation example

https://github.com/radix-ui/primitives/assets/48249867/bcd35aaa-fcaf-4baa-806f-b520b8f8d962

Expected behavior

It should be initially open when defaultValue / value has some open accordion items

Reproducible example

Can check layout shift when click (Command + Shift + R) on Accordion documentation example

Suggested solution

Since accordion is built on collapsible (might be right?), collapsible's default open determination should consider defaultValue / value, not just false.

Additional context

It seems icon is displaying correctly...? or maybe it is too fast...

Your environment

Since it can be checked on chrome, I attach my mac and chrome info only

  • macOS(m1 pro, Sonoma 14.4.1)
  • Chrome(124.0.6367.158 (arm64))

jinwoo0103 avatar May 10 '24 08:05 jinwoo0103

It's not Chrome-specific, it's on Safari as well.

M3 Max, macOS 14.3.1 Safari Version 17.3.1 (19617.2.4.11.12)

thexpand avatar May 24 '24 21:05 thexpand

How is this going? We have the same issue in our nav that is using this component

alexpuertasr avatar Jun 27 '24 01:06 alexpuertasr

We're also having the same issue. We had to switch first element in view with custom component.

peter-wd-1 avatar Aug 02 '24 00:08 peter-wd-1

anyone have luck with this??

hsavit1 avatar Sep 15 '24 03:09 hsavit1