From Sarvesh Kumar: A Hierarchical List Screen Component for Flow

This great-looking component provides an expandable collapsible list view:

It’s optimized to show children of a common parent. So you pass in the recordId of the parent, and the name of the child object. you want to display, and it will show all the children. You can also pass in the names of the columns you’d like to show.

Suppose you want to navigate all the children cases of a particular parent case. Starting with the parent case, you can use this component to easily explore all of the children.

Features
The data table has following features.

  • Show records for both custom and standard object.
  • Specify visible columns
  • No limit for level of hierarchy

Here’s an example configuration:

Note that selection is not currently output for use downstream in the flow.

About

This is a generic lighting hierarchy component , which is built in lwc using the tree grid base component.
The customization are done by design attributes. At onload of page the component shows only first level of record, next level of record in hierarchy are shown on click of expandable button action, and make the call to server via async, There is no limit of any level in hierarchy. If record has no children then expendable option not visiable.

Configuration


Select hierarchy component from left side components drag to Screen

Image description

Inputs

LabelTypeValueExample
Enter Icon NameStringprovide slds icon namestandard:hierarchy For diffrent icons options visit slds-icons
Enter TitleStringprovide table titleHierarchy ( Any heading value can be enter)
Enter Object API NameStringprovide object custom or standard API nameCase
Enter Columns API Name (comma seprated)StringCaseNumber,Subject,OriginCaseNumber,Subject,Origin
Enter Parent field API NameStringEnter Parent field API NameExample: ParentId field is determine parent of Case record.
Enter RecordIdStringprovide record idExample recordId

Install

Version 1.0 Unlocked 12-11-21

Source

source