Skip to content

Extension

Extension can be added to a section of a SectionedTable. It allows custom extension to be rendered in that section.

Extension Properties

Property Type Required
Class string Required
Control string Optional
DataSubscriptions DataSubscriptions Optional
EmptySection EmptySection Optional
ExtensionProperties object Optional
Footer Footer Optional
Header Header Optional
Height integer Optional
Module string Optional
OnPress ActionOrRule Optional
Target LinkQueryFunctionTarget Optional
Visible boolean Optional
_Name string Required
_Type const Required

Class

The name of the exported class in the module control that is to be used for the extension.

  • type: string

Control

The name of the file under the controls folder in your module. e.g. MyExtension, if your file name is /extensions/controls/MyExtension.ts. If not specified, module name would be used as the value for this property.

  • type: string

DataSubscriptions

Array of data change events to subscribe to.


EmptySection

A section that will be displayed when the list is empty, this only applies if you are using Target binding. Allows you to show custom label when the list is empty.


ExtensionProperties

Additional custom properties to be passed to the extension

  • type: object

Footer bar to be displayed below this control's content section.


Header bar to be displayed above this control's content section.


Height

Height of the extension (pt in iOS / dp in Android)

  • type: integer

Module

The module's folder path under /extensions/, e.g. MyExtModule or MyExtLibrary/MyExtModule. Not required if Extension does not implement TS code under /extensions/controls.

  • type: string

OnPress

Action/Rule to be triggered when the extension is pressed


Target

Binding target for this extension. The result of this binding will be stored in the form of an Observable array and it can be accessed in the extension class via context.binding property of the base class, e.g. this.context.binding.


Visible

Visibility of the extension

  • type: boolean

_Name

UID to reference this control.

  • type: string

_Type

  • type: const

The value of this property must be equal to:

"Section.Type.Extension"

Examples

{
  "_Type": "Page",
  "_Name": "SectionTablePage",
  "Caption": "Extension Section Page",
  "Controls": [{
    "_Type": "Control.Type.SectionedTable",
    "Sections": [{
      "_Type": "Section.Type.Extension",
      "_Name": "ExtensionTable",
      "Module": "MapsModule",
      "Control": "Maps",
      "Class": "CustomMap",
      "Height": 500,
      "ExtensionProperties": {
        "Configuration": {
            "EnableCurrentLocation": true,
            "EnableDynamicLayers": true,
            "EnableNearMe": true,
            "EnableFeatureLayers": true,
            "EnableBaseMaps": true
        },
        "Type": "TrafficMap",
        "Title": "Store Locations",
      },
      "OnPress": "/MDKApp/Actions/NavToDetailPage.action",
      "Target": {
            "EntitySet" : "StoreLocations",
            "Service" : "/MDKApp/Services/MyStore.service",
            "QueryOptions" : "/MDKApp/Rules/Stores/GetLocalStoreQueryOptions.js"
      }
    }]
  }]
}