Skip to content

Commit

Permalink
Explain how to order & group Tree View actions (#6002)
Browse files Browse the repository at this point in the history
  • Loading branch information
winstliu authored Feb 1, 2023
1 parent 8337161 commit 5fefd09
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/extension-guides/tree-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,10 @@ Examples:
}
```

By default, actions are ordered alphabetically. To specify a different ordering, add `@` followed by the order you want to the group. For example, `navigation@3` will cause the action to show up 3rd in the `navigation` group.

You can further separate items in the `...` menu by creating different groups. These group names are arbitrary and are ordered alphabetically by group name.

**Note:** If you want to show an action for specific tree items, you can do so by defining the context of a tree item using `TreeItem.contextValue` and you can specify the context value for key `viewItem` in `when` expression.

Examples:
Expand Down

0 comments on commit 5fefd09

Please sign in to comment.