DialogItem
The DialogItem interface is used to specify user interface components in a technology-agnostic way. The UiLayoutDataProvider uses DialogItem specifications to create React components in our App UI system.
For example, this code:
Results in this React component:
The UiLayoutDataProvider has limitations. It only supports a subset of primitive data types, as defined in DialogItemValue and the components are laid out in a simple grid format. A component's position in the grid is specified by the EditorPosition interface with the rowPriority and columnIndex allowing components to be grouped on rows together.When components overflow the Tool Settings bar in the App UI interface, rows are wrapped together so that a row is never broken apart upon overflow wrapping.
The final member of DialogItem is an optional lockProperty. If set, this automatically generates a check-box to enable or disable the component on the dialog. This is useful when the component is part of the Tool Settings for an app's interactive tool. For example, this DialogItem
Will result in this group of React components:
Alternate approach
The PropertyDescriptionHelper provides helper functions that will create DialogProperty objects that help with producing DialogItems
. The example below is an excerpt from a class that defines a length and a useLength property.
The code fragment below shows how to return a DialogItem that can be passed to UI for display.
API Reference
Last Updated: 02 February, 2022