List
Used for showing a flat list of items with different selection modes. It's usually used in master-detail views, or for a list of items with a single attribute. Here is some examples from JetBrains IDEs:
- Settings -> Tools -> SSH Configurations (master-detail)
- Settings -> Appearance & Behavior -> Scopes (master-detail)
- Settings -> Editor -> General -> Console -> Exceptions (single attribute list of items)
- Settings -> Editor -> File and Code Templates (master-detail)
- Settings -> Editor -> Natural Languages (single attribute list of items)
- Show Local History window (advanced layout)
SpeedSearchList
TODO
ItemLayout
While you can render any custom content in Item
s of a list, ItemLayout
is a useful helper component implementing
the most common cases. Render different parts of an item, such as icon, text, etc. inside a ItemLayout
and it handles
the layout, and the spacing between them. Some common parts that require a special style are implemented as components
accessible on ItemLayout
.
ContextMenu
In order to have context menu for list items, just wrap the list in a ContextMenuContainer
. When the context menu
is triggered on an item, the selection is also updated right before the context menu opens, so you can render the
context menu based on the selected item(s).