Skip to content

Simple data component

Vadym edited this page Aug 12, 2021 · 4 revisions

Simple data component allow to work with primitive values like bool, string, number or with simple objects and may be desrcibed using next properties:

  • binding - path to data in data tree to organize two-directional data binding to work with this value
  • type - data type (string, number, bool, object)
  • renderer - control to be used to draw this component. It is optional parameter. When renderer is not specified - component would be created in memory
  • value - predefined component value
  • valueSource - link to remote data source, element will request data using HTTP GET and merge it into data model by binding path.

Component declaration example

simple text component

{
  binding: 'country.name',
  ui: { label: 'Contry name' }
}

simple number component

{
  binding: 'address.num',
  type: 'number',
  ui: { label: 'Address number' }
}

component with a predefined value

{
  binding: 'address.num',
  value: 12,
  ui: { label: 'Address number' }
}