li-integer

Supported Features

Document
Media
Include
Document Creation Flow
Push Message
Table Dashboard
Display Filter
Search Indexing
System Metadata

Default UI

  • Renders a number input.
  • No UI is rendered if the handle is lastProofreadRevision.
  • Added in: release-2023-03: Renders a select element if a dataProvider is configured

Storage Format

<Integer>

Content Type Config

{
  handle: 'myContentType',
  // ...
  metadata: [
    {
      handle: 'myHandle'
      type: 'li-integer',
      config: {
        // common
        hideFromForm: false,                     // optional, default: false
        required: true,                          // optional, default: false
        requiredErrorMessage: 'Provide a value', // optional
        index: true,                             // optional, default: false. Added in: release-2023-07
        // specific
        minValue: 1,                             // optional
        maxValue: 50,                             // optional
        translatable: true,                      // optional, default: false, translations are only supported for data-record and mediaLibrary
        dataProvider: {                          // optional. Added in: release-2023-03
          // Option 1 - list of items
          type: 'labelValuePair',
          items: [
            {label: 'A', value: 1},
            {label: 'B', value: 2, isDefault: true}, // isDefault sets the value if document opened the first time
            {label: 'C', value: 3}
          ]
          // Option 2 - DataSource
          dataSource: 'labelValuePairDataSource'
        }
      },
      ui: {
        label: 'foo',                   // optional, takes camelized name otherwise
        config: {
          placeholder: 'bar',           // optional, takes camelized name otherwise
          readOnly: true                // optional, default: false
        }
      }
    }
    // ...
  ]
}