Class: PillsInstancePanel

components~PillsInstancePanel(formElementId, instances, objectSubstitute, arraySubstitute, booleanTranslateFunction, disabledopt, optionsopt)

A panel that contains Bootstrap pills together with an instance view that allows to choose and display the selected instance.

❗️ This class relies on Bootstrap; if not available, the HTML result will not be properly displayed.

Constructor

new PillsInstancePanel(formElementId, instances, objectSubstitute, arraySubstitute, booleanTranslateFunction, disabledopt, optionsopt)

Parameters:
Name Type Attributes Default Description
formElementId string

The id of the form element.

instances Array

The array of JSON instances.

objectSubstitute string

A string to be shown as choice in the case of an option corresponding to a JSON Schema object type.

arraySubstitute string

A string to be shown as choice in the case of an option corresponding to a JSON Schema array type.

booleanTranslateFunction function

A function that maps boolean values into strings.

disabled boolean <optional>
false

Flag indicating whether the input field 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

choices :Array.<HTMLAnchorElement>

The array of anchors shown as pills.

Type:
  • Array.<HTMLAnchorElement>
Source:

domElement :HTMLDivElement

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

Type:
  • HTMLDivElement
Inherited From:
Implements:
Source:

instances :Array

The array of selectable JSON instances.

Type:
  • Array
Source:

Methods

disable()

Disables the component.

Inherited From:
Implements:
Source:

enable()

Enables the component.

Inherited From:
Implements:
Source:

getId() → {any}

Returns the id of the input control element.

Implements:
Source:
Returns:

The value taken by the component.

Type
any

getValue() → {any}

Returns the value assigned to the component.

Implements:
Source:
Returns:

The value taken by the component.

Type
any