API

 

TranslatableMultipleChoice

Provides properties and methods to create a translatable select list to select multiple option.

class TranslatableOptionList {
  constructor( translate: TranslationService, key: string );
  readonly selectedCount: number;
  selectedIndeces: Array< number >;
  selectedValues: Array< string >;
  readonly selectedTexts: Array< string >;
  readonly selectedItem: Array< TranslatableOption >;
  setState( value: string, selected: boolean ): void;
  selectAll(): void;
  deselectAll(): void;
  next(): IteratorResult< TranslatableOption >;
  [Symbol.iterator](): IterableIterator< TranslatableOption >;
}

constructor()

Creates a new instance of the select list.

translate
The translation service.
key
The key of the text node that contains the keys and texts of the items.

selectedCount

Gets the count of the selected items.

selectedIndeces

Gets or sets the indeces of the selected items.

selectedValues

Gets or sets the values of the selected items.

selectedTexts

Gets the translated texts of the selected items.

selectedItems

Gets the selected items.

setState()

value
The value of the item to set.
selected
Indicates whether the item is selected or unselected.

selectAll()

Selects all items.

deselectAll()

Deselects all items.

next()

Returns the next iterator result.

[Symbol.iterator]()

Returns the iterator of the list.