PropertyEditors

The PropertyEditors category in the @itwin/components-react package includes classes and components for working with Property Editors. Property editors are used by the Table, Tree and PropertyGrid components for cell editing of properties. Property editors have two pieces:

  1. A class that extends PropertyEditorBase, is registered for a certain type name and optionally an editor name, and returns a React node for the editor component
  2. A React component that implements TypeEditor and renders the editor and processes user interaction

Each property editor must be registered with the PropertyEditorManager for a given type name, and optionally an editor name, by calling the registerEditor method.

PropertyEditorManager.registerEditor("text", BasicPropertyEditor);

The EditorContainer component is used by the Table, Tree and PropertyGrid for cell editing. Those components render an EditorContainer in a cell when cell editing is invoked. The EditorContainer creates the appropriate property editor based on the cell's PropertyDescription, which contains the type name and optional editor name.

The following is a list of the provided property editors:

Note: PropertyEditorManager.registerEditor is called by the system for these delivered property editors.

Standard Type Names and Editor Names

The StandardTypeNames and StandardEditorNames enums can be used when populating a PropertyDescription. These enums contain the type and editor names used when registering the editors listed above.

API Reference

Last Updated: 20 June, 2023