File tree 3 files changed +15
-5
lines changed
force-app/components/tagRecordForm/lwc/tagRecordForm
3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ <h3 class="slds-section__title slds-truncate slds-p-around_xx-small slds-theme_s
21
21
fields ={fieldArray}
22
22
columns ={columns}
23
23
mode ={mode}
24
+ density ={density}
24
25
>
25
26
</ lightning-record-form >
26
27
</ template >
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export default class TagRecordForm extends LightningElement {
5
5
@api label ;
6
6
@api fields ;
7
7
@api twoColumns ;
8
+ @api isDefaultOpen ;
8
9
@api readOnly ;
9
10
10
11
@track fieldArray = [ ] ;
@@ -20,7 +21,7 @@ export default class TagRecordForm extends LightningElement {
20
21
}
21
22
22
23
if ( typeof this . open === 'undefined' ) {
23
- this . open = true ;
24
+ this . open = this . isDefaultOpen ;
24
25
}
25
26
} catch ( error ) {
26
27
console . error ( 'Error in connectedCallback: ' + error . message ) ;
@@ -31,7 +32,10 @@ export default class TagRecordForm extends LightningElement {
31
32
return this . open ? 'slds-section slds-is-open' : 'slds-section' ;
32
33
}
33
34
get mode ( ) {
34
- return this . readOnly ? 'readonly' : 'view' ;
35
+ return 'readonly' ;
36
+ }
37
+ get density ( ) {
38
+ return 'Comfy' ;
35
39
}
36
40
get columns ( ) {
37
41
return this . twoColumns ? '2' : '1' ;
Original file line number Diff line number Diff line change 2
2
<LightningComponentBundle xmlns =" http://soap.sforce.com/2006/04/metadata" >
3
3
<apiVersion >62.0</apiVersion >
4
4
<isExposed >true</isExposed >
5
+ <masterLabel >TAG - Record Form</masterLabel >
6
+ <description >Simple component that display fields in two columns, with same styling as standard dynamic field sections.</description >
5
7
<targets >
6
8
<target >lightning__RecordPage</target >
7
9
</targets >
10
12
<objects >
11
13
<object >Account</object >
12
14
</objects >
13
- <property name =" fields" type =" String" />
14
- <property name =" label" type =" String" />
15
+ <property name =" label" type =" String" description =" Section header." />
16
+ <property name =" fields" type =" String" description =" API names seprated by comma." />
17
+ <property name =" isDefaultOpen" type =" Boolean" default =" true"
18
+ description =" If checked, the section is open on page refresh. Closed if unchecked." />
19
+ <property name =" twoColumns" type =" Boolean" default =" true"
20
+ description =" If checked, the fields will display in two columns. One columns if unchecked." />
15
21
<property name =" readOnly" type =" Boolean" default =" true" />
16
- <property name =" twoColumns" type =" Boolean" default =" true" />
17
22
<supportedFormFactors >
18
23
<supportedFormFactor type =" Large" />
19
24
<supportedFormFactor type =" Small" />
You can’t perform that action at this time.
0 commit comments