Skip to content

List: groups expanded by default when collapsible=true #86

@jerrythomas

Description

@jerrythomas

Description

When using <List collapsible />, all groups are expanded on mount. This is incorrect — the "expand all on mount" behavior should only apply when collapsible=false (groups act as fixed section headers). When collapsible=true, groups should start collapsed by default, letting the user expand them.

Root Cause

packages/ui/src/components/List.svelte lines 88–92:

```js
$effect(() => {
for (const [, proxy] of wrapper.lookup) {
if (proxy.hasChildren) proxy.expanded = true
}
})
```

This runs unconditionally regardless of the collapsible prop.

Expected Behavior

  • collapsible=false: all groups expanded (current behaviour — correct)
  • collapsible=true: all groups collapsed on mount; user expands individually

Affected File

packages/ui/src/components/List.svelte

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions