The arguments for the ArrayInput constructor.

interface ArrayInputArgs {
    binding?: BindingBase;
    class?: string | string[];
    dom?: string | HTMLElement;
    elementArgs?: any[];
    enabled?: boolean;
    error?: boolean;
    fixedSize?: boolean;
    getDefaultFn?: (() => any);
    height?: number;
    hidden?: boolean;
    id?: string;
    ignoreParent?: boolean;
    isRoot?: boolean;
    link?: {
        observer: Observer | Observer[];
        path: string | string[];
    };
    onChange?: ((value) => void);
    onClick?: (() => void);
    onRemove?: (() => void);
    parent?: Element;
    readOnly?: boolean;
    renderChanges?: boolean;
    style?: string;
    tabIndex?: number;
    type?: "string" | "number" | "boolean" | "vec2" | "vec3" | "vec4";
    usePanels?: boolean;
    value?: any;
    values?: any[];
    width?: number;
}

Hierarchy (view full)

Properties

binding?: BindingBase

A binding to use with this Element.

class?: string | string[]

The class attribute of this Element's HTMLElement.

dom?: string | HTMLElement

The HTMLElement to create this Element with. If not provided this Element will create one.

elementArgs?: any[]

Arguments for each array Element.

enabled?: boolean

Sets whether it is possible to interact with this Element and its children.

error?: boolean

Sets whether the Element is in an error state.

fixedSize?: boolean

If true then editing the number of elements that the array has will not be allowed.

getDefaultFn?: (() => any)

Used to specify the default values for each element in the array. Defaults to null.

Type declaration

    • (): any
    • Returns any

height?: number

Sets the initial height of the Element.

hidden?: boolean

Sets whether this Element is hidden. Defaults to false.

id?: string

The id attribute of this Element's HTMLElement.

ignoreParent?: boolean

If true, this Element will ignore its parent's enabled value when determining whether this element is enabled. Defaults to false.

isRoot?: boolean

Sets whether this Element is at the root of the hierarchy.

link?: {
    observer: Observer | Observer[];
    path: string | string[];
}

Links the observer attribute at the path location in the given observer to this Element.

Type declaration

  • observer: Observer | Observer[]
  • path: string | string[]
onChange?: ((value) => void)

If provided and the Element is changeable, this function will be called each time the element value is changed.

Type declaration

    • (value): void
    • Parameters

      • value: any

      Returns void

onClick?: (() => void)

If provided and the Element is clickable, this function will be called each time the element is clicked.

Type declaration

    • (): void
    • Returns void

onRemove?: (() => void)

If provided and the Element is removable, this function will be called each time the element is removed.

Type declaration

    • (): void
    • Returns void

parent?: Element

Sets the parent Element.

readOnly?: boolean

Whether this Element is read only or not. Defaults to false.

renderChanges?: boolean

If true each input will flash on changes.

style?: string

Sets an initial value for Element.dom.style.

tabIndex?: number

Sets the tabIndex of the Element.

type?: "string" | "number" | "boolean" | "vec2" | "vec3" | "vec4"

The type of values that the array can hold. Can be one of the following:

  • boolean
  • number
  • string
  • vec2
  • vec3
  • vec4

Defaults to string.

usePanels?: boolean

If true then the array will be rendered using panels. Defaults to false.

value?: any

Sets the value of the Element.

values?: any[]

Sets multiple values to the Element. It is up to the Element to determine how to display them.

width?: number

Sets the initial width of the Element.