TypeConverters

The TypeConverters category in the @itwin/components-react package includes various Type Converter classes for different types.

All type converters extend the TypeConverter abstract class. The TypeConverter class implements the SortComparer, OperatorProcessor and NullableOperatorProcessor interfaces.

Type converters may optionally implement one of the following interfaces to provide value processing for Table filtering:

Each type converter must be registered with the TypeConverterManager for a given type name by calling the registerConverter method.

TypeConverterManager.registerConverter("string", StringTypeConverter);

A type converter may be obtained for a certain type name by calling the TypeConverterManager.getConverter method:

const typeConverter = TypeConverterManager.TypeConverterManager.getConverter("string");

The following is a list of the provided type converters:

Note: TypeConverterManager.registerConverter is called by the system for these delivered type converters.

Standard Type Names

The StandardTypeNames enum can be used when populating a PropertyDescription. This enum contains the type names used when registering the converters listed above.

API Reference

Last Updated: 02 February, 2022