File

core/dynamic-forms/checkbox/checkbox.type.component.ts

Extends

FieldType

Metadata

Index

Properties

Properties

Static Readonly CONFIG
Type : ConfigOption
Default value : { types: [ { name: 'checkbox', component: FieldCheckbox }, { name: 'boolean', extends: 'checkbox' }, { name: 'switch', extends: 'checkbox', defaultOptions: { templateOptions: { switchMode: false, indeterminate: false } } } ] }
defaultOptions
Type : object
Default value : { templateOptions: { indeterminate: true, formCheck: 'custom' // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline' | 'nolabel' } }
<label
  [class.c8y-checkbox]="!to.switchMode"
  [class.c8y-switch]="to.switchMode"
  [class.has-error]="showError"
>
  <input
    type="checkbox"
    [class.is-invalid]="showError"
    [class.form-check-input]="to.formCheck.indexOf('custom') === -1"
    [class.position-static]="to.formCheck === 'nolabel'"
    [class.custom-control-input]="to.formCheck.indexOf('custom') === 0"
    [indeterminate]="to.indeterminate && formControl.value == null"
    [formControl]="formControl"
    [formlyAttributes]="field"
  />
  <span></span>
  <span class="text-truncate" title="{{ to.label | humanize }}">{{ to.label | humanize }}</span>
  <span *ngIf="to.required && to.hideRequiredMarker !== true">
    <em class="m-l-4" translate>(required)</em>
  </span>
  <button
    *ngIf="!!to.description"
    class="btn-help btn-help--sm m-l-4 m-t-auto m-b-auto"
    [attr.aria-label]="'Help' | translate"
    [popover]="to.description"
    triggers="focus"
    type="button"
  ></button>
</label>

results matching ""

    No results matching ""