Interface: PropertyOptions
dg.PropertyOptions
Properties
caption
• Optional
caption: string
Custom field caption shown in [PropertyGrid]
Defined in
category
• Optional
category: string
Corresponding category on the context panel
Defined in
choices
• Optional
choices: string
[]
List of choices. Applicable to string properties only
Defined in
defaultValue
• Optional
defaultValue: any
Default value (used for deserialization, cloning, etc)
Defined in
description
• Optional
description: string
Property description
Defined in
editor
• Optional
editor: string
Custom editor (such as slider or text area)
Defined in
fieldName
• Optional
fieldName: string
Name of the corresponding JavaScript field. No need to specify it if it is the same as name.
Defined in
format
• Optional
format: string
Value format
Defined in
inputType
• Optional
inputType: string
Property input type
Defined in
max
• Optional
max: number
Maximum value. Applicable to numerical properties only
Defined in
min
• Optional
min: number
Minimum value. Applicable to numerical properties only
Defined in
name
• Optional
name: string
Property name
Defined in
nullable
• Optional
nullable: boolean
Whether an empty value is allowed. This is used by validators.
Defined in
postfix
• Optional
postfix: string
Field postfix shown in [PropertyGrid]. [units] take precedence over the [postfix] value.
Defined in
semType
• Optional
semType: string
Semantic type
Defined in
tags
• Optional
tags: any
Defined in
type
• Optional
type: string
Property type
Defined in
units
• Optional
units: string
Units of measurement. See also: [postfix]
Defined in
userEditable
• Optional
userEditable: boolean
Whether the property should be editable via the UI
Defined in
validators
• Optional
validators: string
[]
List of validators. It can include [NAMED_VALIDATORS] as well as any pre-defined function names. Signature: validator(x: DG.Type): string | null. [null] indicates that the value is valid, [string] describes a validation error.
Defined in
valueValidators
• Optional
valueValidators: ValueValidator
<any
>[]
List of value validators (functions that take a value and return error message or null)