src/ui/viewer/components/field-set/field-set.component.ts
selector | smart-viewer-fieldset |
styleUrls | ./field-set.component.css |
templateUrl | ./field-set.component.html |
Properties |
Inputs |
Accessors |
constructor(screenService: SmartScreenService, renderer: Renderer2, element: ElementRef)
|
||||||||||||
Parameters :
|
definition |
Type : SmartViewerFieldsetSettings
|
hasAbsolutePosition |
Type : boolean
|
inline-labels |
Type : boolean
|
itemIndex |
Type : number
|
partOfGroup |
Type : boolean
|
title |
Type : string
|
classList |
Type : string
|
Default value : ''
|
fields |
Type : SmartViewerFieldSettings[]
|
Default value : []
|
fieldSet |
Type : ElementRef
|
Decorators :
@ViewChild('fieldSet', {read: ElementRef})
|
height |
Type : number
|
Default value : 0
|
lastChild |
Type : SmartViewerFieldComponent | FieldSetComponent
|
maxDepthValue |
Type : number
|
Default value : 0
|
padded |
Type : boolean
|
fieldChildren | ||||
setfieldChildren(fieldChildren)
|
||||
Parameters :
Returns :
void
|
fieldsetChildren | ||||
setfieldsetChildren(fieldsetChildren)
|
||||
Parameters :
Returns :
void
|
fieldsetHeight |
getfieldsetHeight()
|
|
top |
gettop()
|
Returns :
number
|
<fieldset #fieldSet [ngClass]="{ padded: padded, 'smart-viewer-fieldset': true }" [class]="classList">
<legend *ngIf="!definition.inputSettings || definition.inputSettings.noLabel!==true">{{definition && definition.title}}</legend>
<ng-container *ngFor="let item of fields">
<smart-viewer-group
*ngIf="item.type === 'group'"
[definition]="item">
</smart-viewer-group>
<smart-viewer-field
[field]="item"
[inline-label]="inlineLabels"
*ngIf="item.type !== 'group' && item.type !=='fieldset'"></smart-viewer-field>
<smart-viewer-fieldset
[definition]="item"
*ngIf="item.type === 'fieldset'">
</smart-viewer-fieldset>
</ng-container>
</fieldset>
./field-set.component.css
::ng-deep legend {
border-bottom: unset !important;
}
fieldset.padded {
margin-top: 20px;
}
.smart-viewer-fieldset.border-all {
border: 1px solid lightgray !important;
padding: 10px !important;
border-radius: 0.25rem !important;
}
.smart-viewer-fieldset.border-top {
border-top: 1px solid black !important;
}