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
+80-18Lines changed: 80 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,23 +8,25 @@
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
28
30
29
31
## Steps to Customization through Design Attribute
30
32
@@ -50,11 +52,16 @@ Custom Data types (the component extendedDatatable extends lightning:datatable)
50
52
51
53
## Customized Field JSON
52
54
53
-
`label` : This key is for override column Name. ( [Example : Override Column Label](#example--override-column-label) )
55
+
`label` : This key is for override column Name. ( [Example : Override Column Label](#single-override) )
54
56
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) )
57
+
`type` : This key is for the override column Type :
58
+
-[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) )
62
+
`typeAttributes` : This key is used for custom columns :
63
+
- 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
138
+
139
+
`fieldName` and `value.fieldName` : field API name that links the record to the parent record
140
+
141
+
`fields` : what is displayed in the column (here the name of the account)
142
+
88
143
#### Add a hyperlink to navigate to the record
89
144
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).
145
+
146
+
**Use cases :**
147
+
- non-editable lookup redirection to the record page
148
+
- redirection when a field is clicked (ex: a click on the firstname or lastname of a contact redirects to the record page)
149
+
150
+
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).
151
+
152
+
**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
153
92
154
```yml
93
155
{
@@ -106,7 +168,7 @@ The example enables redirection to the account when we click on the account name
106
168
107
169
## Buttons configuration
108
170
109
-
To configure buttons(variant are the style of a button) see the documentation here :
171
+
To configure buttons(variant is the style of a button) see the documentation here :
0 commit comments