Skip to content

Dictionary data component

Vadym edited this page Aug 12, 2021 · 8 revisions

Dictionary data components allow working with objects which are defined in the list.

Dictionaries can be of two types:

  • local dictionaries - comes with form declaration and cached locally
  • server dictionaries - should be loaded from server each time component requests data

This type of component is inherited from the data component and inherits its base set of properties. Dictionary component also has its own properties:

  • dictionary - dictionary name to get data from root form related static dictionaries, or can point to the remote data source (element will request it with HTTP GET call during initialization phase).

Dictionary-based components also support declaring filters through metadata and can own only a set of dictionary data based on filtering criteria. More information about filtering can be found here: component filtration extension

Component declaration example

simple dictionary component

{
  binding: 'country',
  dictionary: 'countries',
  ui: { label: 'Country' }
}

dictionary component with filters

{
  binding: 'city',
  dictionary: 'cities',
  filters: [{
    by: 'name',
    comparator: 'contains',
    val: 'york'
  }]
}