Skip to content

TypeScript Function APIDocs


TypeScript Function API / asset_builder / PropWidgetDefinitionBuilder

Class: PropWidgetDefinitionBuilder

Create a widget for interacting with a prop that is displayed in the modelling view.

Example

ts
const validation = new PropWidgetDefinitionBuilder()
 .setKind("text")
 .build()

Implements

Constructors

new PropWidgetDefinitionBuilder()

new PropWidgetDefinitionBuilder(): PropWidgetDefinitionBuilder

Returns

PropWidgetDefinitionBuilder

Defined in

asset_builder.ts:306

Properties

propWidget

propWidget: PropWidgetDefinition

Defined in

asset_builder.ts:304

Methods

setKind()

setKind(kind): this

The type of widget

Parameters

kind: PropWidgetDefinitionKind

{PropWidgetDefinitionKind} [array | checkbox | color | comboBox | header | map | select | text | textArea | codeEditor | password]

Returns

this

this

Example

ts
.setKind("color")

Implementation of

IPropWidgetDefinitionBuilder.setKind

Defined in

asset_builder.ts:320


addOption()

addOption(key, value): this

Add an option when using a comboBox

Parameters

key: string

the value displayed in the comboBox

value: string

the value the prop is set to

Returns

this

this

Example

ts
.setOption("us-east-2 - US East (Ohio)", "us-east-2")

Implementation of

IPropWidgetDefinitionBuilder.addOption

Defined in

asset_builder.ts:337


build()

build(): PropWidgetDefinition

Build the object

Returns

PropWidgetDefinition

Example

ts
.build()

Implementation of

IPropWidgetDefinitionBuilder.build

Defined in

asset_builder.ts:355