General
-
The tree view can be rendered from a list of records, as long as each record has
parentId
. -
parentId
can be undefined. In this case, the record is a root.
Example 136. Code JSON
{ "tableName": "clcommon__document_category__c", "whereClause": { "freeForm": "genesis__Application__c = ':applicationId' and (clcommon__Parent_Document_Category__c = null OR (clcommon__Parent_Document_Category__c != null AND clcommon__Show_In_Portal__c = 'UPLOAD_VIA_PORTAL'))" }, "sections": [{ "fields": [{ "fieldName": "clcommon__Category_Name__c", "fieldUi": {...} }, { "fieldName": "clcommon__Parent_Document_Category__r.Id", "fieldUi": {} }] }] }
-
treeViewMapping
converts a flat list of records into a hierarchical tree structure -
Each tree node has
entry
(as label of a tree node) andchildren
, as well as other attributes that can be used by handlers -
Only the leaf nodes can be clicked and highlighted.
-
By default, all roots are collapsed.
-
If
treeExpand
is true, all the tree nodes are expanded by default. -
Tree view can work with staticData
-
entry
andchildren
are must-have.
Example 139. Code JSON
"staticData": [{ "entry": "Application Documents", "categoryId": "a1K4S000000p2GdUAI", "children": [{ "entry": "Business Entity", "categoryId": "a1K4S000000p2GeUAI", "children": [{ "entry": "Business License", "categoryId": "a1K4S000000p2GfUAI" }, { "entry": "Business Tax Return", "categoryId": "a1K4S000000p2GhUAI" }, { "entry": "Corporate Documents", "categoryId": "a1K4S000000p2GgUAI" }] }] }]
Status
Release Available |
Status |
Framework Name |
---|---|---|
3.4 |
Current |
TBC |