Function defaultValue

  • A decorator that provides a sane default value for the decorated field. This default value is primarily used to enable a 'Reset to default' UX in the object inspector UI. However, there are other potential use-cases for the attribute, such as providing a default value for a field when a field value is programmatically created.

    Parameters

    • valueOrGenerator: any

      The default value to set the object to, or a function that generates the value.

    • OptionalplaceHolderLimitType: "Equal" | "Minimum" | "Maximum"

      The placeholder limit type.

    • OptionalplaceholderLimit: number

      The placehoder limit value, values above, equal or below this value will display a placeholder.

    Returns AttributeDecorator<Attribute>