@hmiproject/helio-sdk
    Preparing search index...

    Type Alias CreateDynamicPropertyOptions<Schema>

    type CreateDynamicPropertyOptions<Schema extends PropsSchema> = {
        category?: string;
        description?: string;
        icon?: IconRef;
        id?: string;
        name: string;
        propsSchema: Schema;
        valueTypes?: PropertyValueType[];
        writable: boolean;
        useDynamicProperty(
            props: CurrentSchemaValues<Schema>,
        ): UseDynamicPropertyResult;
    }

    Type Parameters

    Index

    Properties

    category?: string

    Optional category for grouping this dynamic property in the HELIO IDE.

    description?: string

    Description of this dynamic property that will appear in the IDE.

    icon?: IconRef

    Optional icon to identify this dynamic property in the HELIO IDE.

    { name: 'Dinosaur' }
    
    id?: string

    Internal ID of the dynamic property. This uniquely identifies the dynamic property within the extension and should never change. If this property is omitted, the dynamic property will be referenced by its name.

    name: string

    Human-readable name of the dynamic property as it will appear in the HELIO IDE.

    Note: If no explicit id is provided, this value will also be used to create a unique id for the dynamic property.

    Changing the name in an extension update will break dynamic property references in existing projects.

    If you need to change the name, make sure to provide an id with the old name to ensure a smooth migration.

    Migrating dynamic property name.

    {
    name: 'New Dynamic Property Name',
    id: 'Old Dynamic Property Name',
    // ...other `createDynamicProperty` options...
    }
    propsSchema: Schema

    Schema containing the properties this dynamic property accepts, created using the createPropsSchema function.

    valueTypes?: PropertyValueType[]

    What kinds of values does this dynamic property provide?

    This restricts the contexts in which the dynamic property is available. For example, dynamic properties that can produce strings can be used as labels, in outputs, etc.

    Dynamic Property can produce scalar values like strings, numbers, booleans, dates, etc.

    ['PrimitiveValue']
    

    Dynamic Property can produce either strings or numbers.

    ['String', 'Number']
    

    Dynamic Property can produce image URLs.

    ['Image']
    
    ['*']
    
    writable: boolean

    Does this dynamic property support write operations?

    If set to false, elements like inputs will be automatically disabled when receiving values from this dynamic property.

    Note that a dynamic property might support writing but still want to dynamically enable/disable write access due to other factors. This can be done using the UseDynamic PropertyResult.canWrite | canWrite property returned from implementation of CreateDynamic PropertyOptions.useDynamic Property.

    UseDynamic PropertyResult.canWrite

    Methods