Module: alfresco/core/ValueDisplayMapMixin

alfresco/core/ValueDisplayMapMixin

This module is intended to be mixed into any widget that needs to map a display value to an actual value (e.g. when a value should be represented by something more user friendly). It was written with the intention of being mixed into both the Property and MultipleEntryElement modules. Widgets that mixin in this module can then accept a valueDisplayMap attribute that is intended to be in the same format as the "fixed" attribute of the optionsConfig form control configuration (e.g. an array of objects that contain "label" and "value" attributes).
Author:
  • Dave Draper
License:
Source:

Members

valueDisplayMap :object

This should be configured to be the map of values to display labels.
Type:
  • object
Default Value:
  • null
Source:

Methods

mapValueToDisplayValue(value) → {string}

Maps the supplied value to the display value that represents it. If no mapped display value is found then the original value is returned.
Parameters:
Name Type Description
value string The value to map
Source:
Returns:
The mapped display value
Type
string