File

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

Extends

FieldType

Metadata

changeDetection ChangeDetectionStrategy.OnPush
selector c8y-field-checkbox
templateUrl ./checkbox.type.component.html

Index

Properties

Properties

Static Readonly CONFIG
CONFIG: ConfigOption
Type : ConfigOption
Default value : { types: [ { name: 'checkbox', component: FieldCheckbox }, { name: 'boolean', extends: 'checkbox' } ] }
defaultOptions
defaultOptions: object
Type : object
Default value : { templateOptions: { indeterminate: true, formCheck: 'custom' // 'custom' | 'custom-inline' | 'custom-switch' | 'stacked' | 'inline' | 'nolabel' } }
  <label class="c8y-checkbox" [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> {{ to.label }} </span>
    <span *ngIf="to.required && to.hideRequiredMarker !== true"><em class="m-l-4" translate>(required)</em></span>
    <button
      *ngIf="!!to.description"
      class="btn-clean m-l-4 flex-item-middle"
      [popover]="to.description"
      placement="auto"
      outsideClick="true"
      type="button"
    >
      <i c8yIcon="question-circle-o" class="text-primary"></i>
  </button>
  </label>

result-matching ""

    No results matching ""