You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+84-19Lines changed: 84 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,23 +8,27 @@
8
8
9
9
To deploy the component see [Deploy](#deploy)
10
10
11
-
This is generic lighting data table , which is build in lwc.
12
-
The customization are done by design attributes.
11
+
This is a generic lighting datatable, which is built in LWC.
12
+
The customization is done by design attributes.
13
13
14
14
Main features
15
15
16
-
- Show records for both custom and standard object.
17
-
- Add cols as per the fields exist in object in JSON format.
18
-
- Pagination as First,Previous,Next,Last buttons.
16
+
- Show records for both custom and standard objects.
17
+
- Add cols as per the fields that exist in object in JSON format.
18
+
- Pagination as First,Previous,Next and Last buttons.
19
19
- New record creation action
20
-
- Row action, like : show detail, edit record, delete record
20
+
- Row action like : show detail, edit a record, delete a record
21
21
- Hide/Unhide checkbox column
22
22
- Configurable actions buttons (for developers, see [Buttons configuration](#buttons-configuration) )
23
23
- Sorting by field (Note: sort will not work on search).
24
+
- Search
24
25
25
26
Custom Data types (the component extendedDatatable extends lightning:datatable) :
26
27
27
28
- picklist
29
+
- lookup
30
+
- long text area
31
+
- formula (image)
28
32
29
33
## Steps to Customization through Design Attribute
30
34
@@ -37,7 +41,8 @@ Custom Data types (the component extendedDatatable extends lightning:datatable)
37
41
| Enter Object API Name |:heavy_check_mark:| String | provide object custom or standard API name | Contact |
38
42
| Enter Columns API Name by comma seprated |:heavy_check_mark:| String |**Note** : for related field it should be concat with . i.e : Account.Name for contact, Inline Edit not support cross reference Field | FirstName,LastName,Email,Phone |
39
43
| Enter Customized Field JSON ( This is Mandatory for Related Field ) |:x:| String | customized Column Label, Record Redirect, Data Type. **Note** : This is Mandatory for Related Fields i.e : Account.Name for contact | See below [**Customized Field JSON**](#customized-field-json)|
40
-
| Enter Related field API Name |:x:| String | Enter related field api name | Example AccountId for contact when component is on account layout. |
44
+
| Enter Related field API Name |:x:| String | Enter related field API name | Example AccountId for contact when component is on account layout. |
45
+
| Formula Image Field API Names |:x:| String | Enter formula field API names **Note** : This is mandatory for formula fields displaying images |\["FormulaField__c"\]|
| Enter WHERE clause |:x:| String | provide aditional filters | Example `LastName like '%s' AND Account.Name like '%t'`|
43
48
| Order by |:x:| String | set the order by clause | Example `LastName, Account.Name DESC`|
@@ -50,11 +55,16 @@ Custom Data types (the component extendedDatatable extends lightning:datatable)
50
55
51
56
## Customized Field JSON
52
57
53
-
`label` : This key is for override column Name. ( [Example : Override Column Label](#example--override-column-label) )
58
+
`label` : This key is for override column Name. ( [Example : Override Column Label](#single-override) )
54
59
55
-
`type` : This key is for override column Type [supported_lwc_datatable_datatype](https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/documentation). ( Ex : `url` ). ( [Example : Related Field Customized](#example--related-field-customized) )
60
+
`type` : This key is for the override column Type :
61
+
-[supported_lwc_datatable_datatype](https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/documentation). ( Ex : `url` ). ( [Example : Related Field Customized](#related-field-customized) )
`typeAttributes` : This key is used for hyperlink to recordId. ( `recId` stored recordId Field ). ( [Example : Add Hyperlink for navigate to record](#example--add-hyperlink-for-navigate-to-record) )
65
+
`typeAttributes` : This key is used for custom columns :
66
+
- a hyperlink to recordId (id of the current detail page) ( `recId` stored recordId Field ). ( [Example : Add Hyperlink for navigate to record](#example--add-hyperlink-for-navigate-to-record) )
`placeholder` : text displayed when the lookup search bar is empty
141
+
142
+
`fieldName` and `value.fieldName` : field API name that links the record to the parent record
143
+
144
+
`fields` : what is displayed in the column (here the name of the account)
145
+
88
146
#### Add a hyperlink to navigate to the record
89
147
90
-
The example enables redirection to the account when we click on the account name of a contact (the field Account.Name is included in columns api name in the example).
148
+
149
+
**Use cases :**
150
+
- non-editable lookup redirection to the record page
151
+
- redirection when a field is clicked (ex: a click on the firstname or lastname of a contact redirects to the record page)
152
+
153
+
The example enables redirection to the account when we click on the account name of a contact (the field Account.Name is included in columns API name in the example).
154
+
155
+
**When used for a lookup the field is not editable (to have an editable lookup field see the [section](#lookup-editable-column) above for editable lookup)**
91
156
92
157
```yml
93
158
{
@@ -106,7 +171,7 @@ The example enables redirection to the account when we click on the account name
106
171
107
172
## Buttons configuration
108
173
109
-
To configure buttons(variant are the style of a button) see the documentation here :
174
+
To configure buttons(variant is the style of a button) see the documentation here :
0 commit comments