div-collection-item-builder

No description yet.

Parameters

Parameters Description
data

raw_array

Required parameter.

Data that will be used to create collection elements.

Available platforms: Android, iOS, web.

prototypes

array

Required parameter.

Array of div elements from which the collection elements will be created.

An array must not be empty.

Available platforms: Android, iOS, web.

data_element_name

string

Name for accessing the next data element in the prototype. Working with this element is the same as with dictionaries.

Default value: it.

Available platforms: Android, iOS, web.

prototype

Parameters Description
div

object

Required parameter.

Div from which the collection elements will be created. In Div, you can use expressions using data from data. To access the next data element, you need to use the same prefix as in data_element_prefix.

The value has the type div.

List of possible values:

  • div-image
  • div-gif-image
  • div-text
  • div-separator
  • div-container
  • div-grid
  • div-gallery
  • div-pager
  • div-tabs
  • div-state
  • div-custom
  • div-indicator
  • div-slider
  • div-switch
  • div-input
  • div-select
  • div-video
  • id

    string

    id of the element to be created from the prototype. Unlike the div-base.id field, may contain expressions. Has a higher priority than div-base.id.

    selector

    bool_int

    A condition that is used to select the prototype for the next element in the collection. If there is more than 1 true condition, the earlier prototype is selected. If none of the conditions are met, the element from data is skipped.

    Default value: true.

    JSON
    {
      data*: "raw_array",
      data_element_name: "string",
      prototypes*: [
        {
          div*: div,
          id: "string",
          selector: "bool_int"
        },
        ...
      ]
    }