Class: InputItem

InputItem

InputItem holds input DOM and takes care of its validation using QueryValidator.

Constructor

new InputItem(queryData, index)

Create InputItemWrapper.
Parameters:
Name Type Description
queryData QueryDataBlock An instance of QueryData.
index number Order index of the input item in a query.
Source:

Members

inputData

Returns obect with detailed information about this InputItem.
Source:

option

Assign OptionItem to this instance of InputItem.
Source:

restrictWriteAccess

Set if this InputItem's dom input is user editable.
Source:

value

Get all input item values, either the one typed in or all the assigned options.
Source:

Methods

associateCheckRule() → {InputItem}

Associtate this InputItem with QueryValidator for its future validation. Directly refferences to the QueryDataBlock's QueryValidator for this item.
Source:
Returns:
- This instance.
Type
InputItem

changeAssignedOptionsValue() → {InputItem}

Modify InputItem DOM input value based on current this.internalValue.assignedOptions state.
Source:
Returns:
- This instance.
Type
InputItem

createInput() → {InputItem}

Creates InputItem DOM representation.
Source:
Returns:
- This instance.
Type
InputItem

deleteOption() → {InputItem}

Remove OptionItem from this instance of InputItem.
Source:
Returns:
- This instance.
Type
InputItem

onInputValueChange(callback) → {InputItem}

InputItem ValueChange event - call function on value change.
Parameters:
Name Type Description
callback function The function that should be executed on input's value change.
Source:
Returns:
- This instance.
Type
InputItem

orderAssignedOptions() → {Array.<OptionItem>}

Order OptionItems in InputItem by their position rather than the order they were dragged in (reorder). Depends on Query direction value - "vertical" or "horizontal" - if no match found fallbacks to "horizontal".
Source:
Returns:
- Ordered Option items.
Type
Array.<OptionItem>

setAttribute(attribute, value) → {InputItem}

Adds attribute with a value to InputItem's DOM input, like: .
Parameters:
Name Type Description
attribute string The name of the attribute.
value string The value of the attribute.
Source:
Returns:
- This instance.
Type
InputItem

setValid(overwriteGraphicsToopt) → {InputItem}

Changes this InputItem DOM input class based on the validity.
Parameters:
Name Type Attributes Description
overwriteGraphicsTo bollean <optional>
If set to true, the InputItem will be force-set to valid.
Source:
Returns:
- This instance.
Type
InputItem

validate() → {InputItem}

Validate data in this InputItem's DOM input = using adequate QueryValidator.
Source:
Returns:
- This instance.
Type
InputItem