Skip to main content

Interface: PropertyOptions

dg.PropertyOptions

Properties

caption

Optional caption: string

Custom field caption shown in [PropertyGrid]

Defined in

src/entities.ts:1181


category

Optional category: string

Corresponding category on the context panel

Defined in

src/entities.ts:1164


choices

Optional choices: string[]

List of choices. Applicable to string properties only

Defined in

src/entities.ts:1155


defaultValue

Optional defaultValue: any

Default value (used for deserialization, cloning, etc)

Defined in

src/entities.ts:1158


description

Optional description: string

Property description

Defined in

src/entities.ts:1140


editor

Optional editor: string

Custom editor (such as slider or text area)

Defined in

src/entities.ts:1161


fieldName

Optional fieldName: string

Name of the corresponding JavaScript field. No need to specify it if it is the same as name.

Defined in

src/entities.ts:1187


format

Optional format: string

Value format

Defined in

src/entities.ts:1167


inputType

Optional inputType: string

Property input type

Defined in

src/entities.ts:1134


max

Optional max: number

Maximum value. Applicable to numerical properties only

Defined in

src/entities.ts:1152


min

Optional min: number

Minimum value. Applicable to numerical properties only

Defined in

src/entities.ts:1149


name

Optional name: string

Property name

Defined in

src/entities.ts:1128


nullable

Optional nullable: boolean

Whether an empty value is allowed. This is used by validators.

Defined in

src/entities.ts:1137


postfix

Optional postfix: string

Field postfix shown in [PropertyGrid]. [units] take precedence over the [postfix] value.

Defined in

src/entities.ts:1184


semType

Optional semType: string

Semantic type

Defined in

src/entities.ts:1143


tags

Optional tags: any

Defined in

src/entities.ts:1189


type

Optional type: string

Property type

Defined in

src/entities.ts:1131


units

Optional units: string

Units of measurement. See also: [postfix]

Defined in

src/entities.ts:1146


userEditable

Optional userEditable: boolean

Whether the property should be editable via the UI

Defined in

src/entities.ts:1170


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

src/entities.ts:1175


valueValidators

Optional valueValidators: ValueValidator<any>[]

List of value validators (functions that take a value and return error message or null)

Defined in

src/entities.ts:1178