Indirect Widgets
Indirect widgets are used to display and edit data not about a selected records, but other entries which are dependent on or related to them.
Dependent Object Editor
Property
Definition
Example
Default
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "DependentObjectEditor widget config",
"type": "object",
"properties": {
"props": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Name of the schema and UI configuration that will be used for listing and editing dependent objects.",
"examples": ["product_variant"]
},
"source": {
"type": "string",
"description": "Name of data source mapping to use for fetching dependent objects. Defaults to the value of `props.type`.",
"examples": ["product_variants"]
},
"mapping": {
"type": "object",
"properties": {
"queryField": {
"type": "string",
"description": "Filter name that will be passed on for querying the source.",
"examples": ["productid"]
},
"dataField": {
"type": "string",
"description": "Json path for setting value of current object in dependent entries.",
"examples": ["data.productId"]
}
}
},
"noCreate": {
"type": "boolean",
"description": "Whether record creation should be restricted.",
"default": false,
"examples": [true]
},
"dependentLister": {
"type": "string",
"description": "Type of dependent lister to use for displaying records.",
"default": "DependentQueryTableLister",
"examples": ["DependentHandlebarsLister"]
},
"keepFilters": {
"type": "boolean",
"description": "Whether original lister filters defined in referenced UI should be displayed or not.",
"default": false,
"examples": [true]
}
}
}
}
}Related Object Editor
Property
Definition
Example
Default
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "RelatedObjectEditor widget config",
"type": "object",
"properties": {
"props": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "Name of data source mapping to use for fetching list of related records and details.",
"examples": ["product"]
},
"selector": {
"type": "string",
"description": "Json path to the id field for representing related record.",
"examples": ["id"]
},
"detail": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "Overriding data source name to use when displaying related record details.",
"examples": ["product-list"]
},
"filter": {
"type": "string",
"description": "Filter parameter to pass related records with when querying from detail source.",
"examples": ["productids"]
},
"columns": {
"type": "array",
"description": "List of table column configurations for displaying related record details.",
"items": {
"type": "object",
"properties": {
"path": { "type": "string" },
"title": { "type": "string" }
}
},
"examples": [[{ "path": "id", "title": "ID" }]]
}
}
},
"list": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "Overriding data source name to use when searching for records.",
"examples": ["product-search"]
},
"filters": {
"type": "object",
"description": "List of main and extra filters for searching from list source.",
"properties": {
"main": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": { "type": "string" },
"widget": { "type": "string" }
}
}
}
},
"examples": [
{
"main": [{ "path": "name", "widget": "TextFilter" }]
}
]
},
"columns": {
"type": "array",
"description": "List of table column configurations for displaying search results.",
"items": {
"type": "object",
"properties": {
"path": { "type": "string" },
"title": { "type": "string" }
}
},
"examples": [[{ "path": "id", "title": "ID" }]]
}
}
},
"updateConfig": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Json path for value to assign to related entities from current record.",
"examples": ["id"]
},
"key": {
"type": "string",
"description": "Json path of related entities to update.",
"examples": ["data.main.collections"]
},
"addUrl": {
"type": "string",
"description": "Url for adding relation to new entities.",
"examples": ["request/rpc/productw/AddToCollection"]
},
"removeUrl": {
"type": "string",
"description": "Url for removing relation from existing entities.",
"examples": ["request/rpc/productw/RemoveFromCollection"]
}
}
}
}
}
}
}History Display
Runner Element Viewer
Last updated
