Skip to main content

InspectorOptions

Options for an inspector.

Extends

Properties

afterUpdate()?

optional afterUpdate: () => any

Optional callback to invoke after an update has occurred.

Returns

any

Inherited from

BaseInspectorOptions.afterUpdate


autoCommit?

optional autoCommit: boolean

Whether or not to auto commit changes on blur/change events. Defaults to true.

Inherited from

BaseInspectorOptions.autoCommit


container

container: HTMLElement

The element into which the inspector is drawn.

Inherited from

BaseInspectorOptions.container


context?

optional context: Record<string, any>

Optional context to also provide to the templates when rendering. This can be accessed via the $context prefix, for instance {{$context.myValue}}

Inherited from

BaseInspectorOptions.context


cssClass?

optional cssClass: string

Optional css class(es) to set on the inspector - a space separated list.

Inherited from

BaseInspectorOptions.cssClass


doNotWriteBlankNewValues?

optional doNotWriteBlankNewValues: boolean

Defaults to true. With this setting, if an update is made that has one or more blank strings, the strings will only be written to objects that already had some value for the corresponding key. If some object has, say, no value stored against the key foo, then the inspector will not write a value of "" for that key into the vertex. The reasoning for this flag is that you cannot get a null value from a text field, so if some text field has no value written in it and then gets a blur event, the UI reports a value of "", ie an empty string. But this is likely not the user's intention, if the field was blank to begin with.

Inherited from

BaseInspectorOptions.doNotWriteBlankNewValues


filter()?

optional filter: (b) => boolean

Optional filter you can use to instruct the inspector to ignore certain items.

Parameters

b

Base

The object to test

Returns

boolean

Inherited from

BaseInspectorOptions.filter


getDefaultValue()?

optional getDefaultValue: (d, key) => any

Optional callback used to retrieve a value for a specific property when it's not present in the object's data.

Parameters

d

ObjectData

key

string

The property key.

Returns

any

Inherited from

BaseInspectorOptions.getDefaultValue


multipleSelections?

optional multipleSelections: boolean

Whether or not to support multiple selections. Defaults to true.

Inherited from

BaseInspectorOptions.multipleSelections


refresh()

refresh: (obj, cb) => void

Callback invoked when a new object has started to be edited.

Parameters

obj

Base

cb

() => any

Returns

void


showCloseButton?

optional showCloseButton: boolean

Defaults to false. When true, the inspector will have a close button in the top right corner, which, when pressed, will clear the Toolkit's selection.

Inherited from

BaseInspectorOptions.showCloseButton


ui

ui: BrowserUI

The UI to attach to.

Inherited from

BaseInspectorOptions.ui