Options
All
  • Public
  • Public/Protected
  • All
Menu

Fields control the display of a list of fields in the editor.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Optional _data

_data?: DeepObject

Optional _uuid

_uuid?: string

config

config: FieldsConfig

Private Optional currentValue

currentValue?: DeepObject

fields

fields: FieldComponent[]

globalConfig

globalConfig: GlobalConfig

Private isLocked

isLocked: boolean

Private Optional originalValue

originalValue?: DeepObject

types

types: Types

Accessors

allowSimple

  • get allowSimple(): boolean

data

  • get data(): undefined | DeepObject
  • set data(data: undefined | DeepObject | Record<string, any>): void

isClean

  • get isClean(): boolean

isSimple

  • get isSimple(): boolean

isValid

  • get isValid(): boolean

previewFields

  • get previewFields(): string[]

uid

  • get uid(): string
  • Returns string

uuid

  • get uuid(): string
  • Returns string

value

  • get value(): any

Methods

addField

  • addField(fieldConfig: FieldConfig & FieldProtectedConfig): void

guessDefaultValue

  • guessDefaultValue(): string | Record<string, any>

lock

  • lock(): void
  • Certain cases require the field to be locked while updating to prevent bad data mixing. This allows for manually locking the fields.

    Returns void

reset

  • reset(): void

template

  • Template for determining how to render the fields.

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    Returns TemplateResult<ResultType>

templatePreviewValue

unlock

  • unlock(): void
  • Certain cases require the field to be locked while updating to prevent bad data mixing. This allows for manually unlocking the fields.

    Returns void

updateOriginal

  • The data is not known to the fields until the rendering is done.

    Updated the original value from the data provided during rendering. This gives a base set of values for clean checks and validation to use.

    Parameters

    • editor: SelectiveEditor

      Selective editor used to render the template.

    • data: DeepObject

      Data provided to render the template.

    • deep: boolean = false

      Update in fields as well, such as when the field is not visible.

    Returns void

Generated using TypeDoc