Home Reference Source
import TreeComponent from 'formiojs/src/components/tree/Tree.js'
public class | source

TreeComponent

Extends:

src/components/_classes/component/Component.js~ComponentFieldNestedComponent → TreeComponent

Static Member Summary

Static Public Members
public static get

builderInfo: {"title": string, "icon": string, "group": string, "weight": number, "schema": *}

Static Method Summary

Static Public Methods
public static

schema(extend: ...*): *

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

componentOptions: {...undefined: Object, "parent": *, "root": *}

public

components: *[]

public
public get
public set
public get
public
public
public get
public
Private Members
private

Method Summary

Public Methods
public

addChild(parent: *)

public

attach(element: *): *

public

attachActions(node: *)

public

attachChildren(node: *): *

public

attachComponents(node: *, args: ...*): *

public

attachNode(element: *, node: *): *

public

cancelNode(node: *)

public

checkData(data: *, flags: *, row: *): *

public

checkNode(data: *, node: *, flags: *, row: *): *

public

createComponents(data: *, node: *): *

public
public

editNode(node: *)

public

getValue(): *

public

init(): *

public

removeComponents(components: *): *

public

removeNode(node: *)

public
public

render(): *

public

renderChildNodes(nodes: *[], odd: *): *

public

renderEdit(node: {}): *

public

renderTree(node: {}, odd: boolean): *

public

renderView(node: {}): *

public

revertNode(node: *)

public

saveNode(node: *)

public
public

setValue(value: *, flags: {}): *

public

toggleNode(node: *)

public

Inherited Summary

From class Field
public

render(element: *): *

From class NestedComponent
public static

schema(extend: ...*): *

public get
public set
public get
public get
public set
public get

data: *

public set
public get
public get
public get
public set
public get

errors: *

public get

isDirty: *

public get
public get
public get
public set
public get
public set
public get

ready: *

public get
public set
public get

schema: *

public get
public get

visible: *

public set
public
public
public
public
private
private

_data: *

private
private
public

addComponent(component: Object, data: Object, before: HTMLElement): Component

Add a new component to the components array.

public

addComponents(element: *, data: *)

public

attach(element: *): *

public

attachComponents(element: *, components: *, container: *): *

public
public

beforePage(next: *): *

Allow components to hook into the next page trigger to perform their own logic.

public

Allow components to hook into the submission to provide their own async data.

public

Return a path of component's value.

public

calculateValue(data: *, flags: *, row: *): *

public

checkAsyncValidity(data: *, dirty: *, row: *, silentCheck: *): *

public

checkConditions(data: *, flags: *, row: *): *

public

checkData(data: *, flags: *, row: *, components: *): *

public

checkModal(isValid: *, dirty: *)

public

checkValidity(data: *, dirty: *, row: *, silentCheck: *): *

public

clear()

public

clearOnHide(show: *)

public
public

createComponent(component: *, data: *): *

Create a new component and add it to the components array.

public
public
public

detach()

public

Perform an iteration over each component within this container component.

public

Perform a deep iteration over every component, including those within other container based components.

public
public

Returns a component provided a key.

public

Return a component provided the Id of the component.

public
public
public

getValue(): *

public

hasComponent(component: *): *

public

init(): *

public

isLastPage(): *

public

isValid(data: *, dirty: *): *

public

removeComponent(component: Component, components: Array<Component>)

Remove a component from the components array.

public

Removes a component provided the Id of the component.

public

Removes a component provided the API key of that component.

public

render(children: *): *

public

renderComponents(components: *): *

public
public
public

setNestedValue(component: *, value: *, flags: {}): *

public

setPristine(pristine: *)

public

setValue(value: *, flags: {}): *

public

shouldSkipValidation(data: *, dirty: *, row: *): *

public

updateValue(value: *, flags: {}): *

Static Public Members

public static get builderInfo: {"title": string, "icon": string, "group": string, "weight": number, "schema": *} source

Static Public Methods

public static schema(extend: ...*): * source

Override:

NestedComponent#schema

Params:

NameTypeAttributeDescription
extend ...*

Return:

*

Public Constructors

public constructor() source

Override:

NestedComponent#constructor

Public Members

public componentOptions: {...undefined: Object, "parent": *, "root": *} source

public components: *[] source

Override:

NestedComponent#components

public dataValue: * source

Override:

NestedComponent#dataValue

public get disabled: * source

Override:

NestedComponent#disabled

public set disabled source

Override:

NestedComponent#disabled

public get emptyValue: {} source

public treeRoot: * source

public type: string source

Override:

NestedComponent#type

public get viewComponents: * source

public viewComponentsInstantiated: boolean source

Private Members

private _viewComponents: * source

Public Methods

public addChild(parent: *) source

Params:

NameTypeAttributeDescription
parent *

public attach(element: *): * source

Override:

NestedComponent#attach

Params:

NameTypeAttributeDescription
element *

Return:

*

public attachActions(node: *) source

Params:

NameTypeAttributeDescription
node *

public attachChildren(node: *): * source

Params:

NameTypeAttributeDescription
node *

Return:

*

public attachComponents(node: *, args: ...*): * source

Override:

NestedComponent#attachComponents

Params:

NameTypeAttributeDescription
node *
args ...*

Return:

*

public attachNode(element: *, node: *): * source

Params:

NameTypeAttributeDescription
element *
node *

Return:

*

public cancelNode(node: *) source

Params:

NameTypeAttributeDescription
node *

public checkData(data: *, flags: *, row: *): * source

Override:

NestedComponent#checkData

Params:

NameTypeAttributeDescription
data *
flags *
row *

Return:

*

public checkNode(data: *, node: *, flags: *, row: *): * source

Params:

NameTypeAttributeDescription
data *
node *
flags *
row *

Return:

*

public createComponents(data: *, node: *): * source

Params:

NameTypeAttributeDescription
data *
node *

Return:

*

public destroy() source

Override:

NestedComponent#destroy

public editNode(node: *) source

Params:

NameTypeAttributeDescription
node *

public getValue(): * source

Override:

NestedComponent#getValue

Return:

*

public init(): * source

Override:

NestedComponent#init

Return:

*

public removeComponents(components: *): * source

Params:

NameTypeAttributeDescription
components *

Return:

*

public removeNode(node: *) source

Params:

NameTypeAttributeDescription
node *

public removeRoot() source

public render(): * source

Override:

NestedComponent#render

Return:

*

public renderChildNodes(nodes: *[], odd: *): * source

Params:

NameTypeAttributeDescription
nodes *[]
  • optional
  • default: []
odd *

Return:

*

public renderEdit(node: {}): * source

Params:

NameTypeAttributeDescription
node {}
  • optional
  • default: {}

Return:

*

public renderTree(node: {}, odd: boolean): * source

Params:

NameTypeAttributeDescription
node {}
  • optional
  • default: {}
odd boolean
  • optional
  • default: true

Return:

*

public renderView(node: {}): * source

Params:

NameTypeAttributeDescription
node {}
  • optional
  • default: {}

Return:

*

public revertNode(node: *) source

Params:

NameTypeAttributeDescription
node *

public saveNode(node: *) source

Params:

NameTypeAttributeDescription
node *

public setRoot() source

public setValue(value: *, flags: {}): * source

Override:

NestedComponent#setValue

Params:

NameTypeAttributeDescription
value *
flags {}
  • optional
  • default: {}

Return:

*

public toggleNode(node: *) source

Params:

NameTypeAttributeDescription
node *

public updateTree() source