Class: MatchTagsField

e2e/fields/MatchField~MatchTagsField(conf)

MatchTagsField

Constructor

new MatchTagsField(conf)

Defines a MatchTagsField.

A MatchTagsField is a field part of a match, it is pretty much like a TagsField except that it is part of a match.

Parameters:
Name Type Description
conf Object

Field configuration

Properties
Name Type Description
name String

Field configuration

baseElement Object

The match element

Source:

Extends

Members

(readonly) availableOptions :Array

The list of available options.

Type:
  • Array
Inherited From:
Source:

(readonly) baseElement :Object

Element from where to look for the field (typically the form element).

Type:
  • Object
Inherited From:
Source:

(readonly) name :String

Field label.

Type:
  • String
Inherited From:
Source:

Methods

clear() → {Promise}

Clears field value by removing all tags.

Inherited From:
Source:
Returns:

Promise resolving when the field is cleared

Type
Promise
Example
myField.clear().then(function() {
  console.log('Field cleared');
});

getDescription() → {Promise}

Gets field description.

Inherited From:
Source:
Returns:

Promise resolving with the description

Type
Promise
Example
myField.getDescription().then(function(description) {
  console.log('Field description is : ' + description);
});

getElement() → {Promise}

Gets match tags field element wrapper.

Overrides:
Source:
Returns:

Promise resolving with the element

Type
Promise

getErrorMessage() → {Promise}

Gets field error message.

Inherited From:
Source:
Returns:

Promise resolving with the error message

Type
Promise
Example
myField.getErrorMessage().then(function(errorMessage) {
  console.log('Error message : ' + errorMessage);
});

getLabel() → {Promise}

Gets field label.

Inherited From:
Source:
Returns:

Promise resolving with the label

Type
Promise
Example
myField.getLabel().then(function(label) {
  console.log('Field label is : ' + label);
});

getText() → {Promise}

Gets field text representation in case of an inline editable field.

Inherited From:
Source:
Returns:

Promise resolving with field text representation

Type
Promise
Example
myField.getText().then(function(text) {
  console.log(text);
});

getValue() → {Promise}

Gets field values, the list of tags.

Inherited From:
Source:
Returns:

Promise resolving with the list of tags

Type
Promise
Example
myField.getValue().then(function(tags) {
  console.log(tags);
});

isOnError() → {Promise}

Tests if a field is considered as on error.

Inherited From:
Source:
Returns:

Promise resolving with a boolean indicating if the field is on error

Type
Promise
Example
myField.isOnError().then(function(isOnError) {
  console.log('Is field on error ? ' + isOnError);
});

setValue(valuesopt) → {Promise}

Sets field value.

Parameters:
Name Type Attributes Default Description
values Array <optional>
[]

Field's list of tags

Inherited From:
Source:
Returns:

Promise resolving when the field is filled

Type
Promise
Example
myField.setValue(['tag 1', 'tag 2']).then(function() {
  console.log('Value set');
});

setValueUsingAutoCompletion(valuesopt) → {Promise}

Sets field value using auto completion.

Parameters:
Name Type Attributes Default Description
values Array <optional>
[]

Field's list of tags

Inherited From:
Source:
Returns:

Promise resolving when the field is filled

Type
Promise
Example
myField.setValueUsingAutoCompletion(['tag 1', 'tag 2']).then(function() {
  console.log('Value set');
});