Class: AddButton

components~AddButton(callback, buttonAttributesopt, optionsopt)

A button that represents the action of adding a child form element to its associated JSON Schema child applicator.

Constructor

new AddButton(callback, buttonAttributesopt, optionsopt)

Parameters:
Name Type Attributes Default Description
callback function

The callback function for the click DOM event generated by the button.

buttonAttributes object <optional>
{}

The parameters to consider as attributes for the HTML <button> element.

Properties
Name Type Attributes Default Description
disabled boolean <optional>
false

Flag indicating whether the button should be disabled at initialization.

options object <optional>
{}

Parameters considered to generate the component.

Properties
Name Type Attributes Description
bootstrap string <optional>

If given, it indicates the Bootstrap version which the component should be built for.

fontAwesome string <optional>

If given, it indicates the Font Awesome version which the component should be built for.

Implements:
Source:

Members

button :HTMLButtonElement

Reference to the DOM object representing the <button> element.

Type:
  • HTMLButtonElement
Source:

domElement :HTMLDivElement

Reference to the DOM object that contains the HTML structure of the component.

Type:
  • HTMLDivElement
Implements:
Source:

Methods

disable()

Disables the component.

Implements:
Source:

enable()

Enables the component.

Implements:
Source: