Skip to content

API to expand/collapse custom TreeItems #55879

@eamodio

Description

@eamodio

I am looking for an API to expand or collapse a specified TreeItem (both deep and shallow).

For example, I would like to provide a Collapse All command for some of my trees to provide a deep collapse (all descendants from the specified item should collapse). Same with expand.

Here are a few more examples: #30288 (comment), gitkraken/vscode-gitlens#383, gitkraken/vscode-gitlens#275

Something similar to reveal that would allow for specifying deep (affects all descendants) or not.

expand(element: T, options?: { deep: boolean } = { deep: false }): Thenable<void>
collapse(element: T, options?: { deep: boolean } = { deep: false }): Thenable<void>

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions