File

core/color-input/color-input.component.ts

Implements

ControlValueAccessor

Metadata

Index

Properties
Methods

Methods

registerOnChange
registerOnChange(fn: (value: string) => void)
Parameters :
Name Type Optional
fn function No
Returns : void
registerOnTouched
registerOnTouched(fn: () => void)
Parameters :
Name Type Optional
fn function No
Returns : void
Optional setDisabledState
setDisabledState(isDisabled: boolean)
Parameters :
Name Type Optional
isDisabled boolean No
Returns : void
valueChange
valueChange(value: string)
Parameters :
Name Type Optional
value string No
Returns : void
writeValue
writeValue(obj: string)
Parameters :
Name Type Optional
obj string No
Returns : void

Properties

currentValue
Type : string
isDisabled
Default value : false
<div class="input-group">
  <div class="color-input form-control">
    <div class="c8y-colorpicker">
      <input
        type="color"
        [disabled]="isDisabled"
        [ngModelOptions]="{ standalone: true }"
        [ngModel]="currentValue"
        (ngModelChange)="valueChange($event)"
      />
      <span [style.background-color]="currentValue"></span>
    </div>
  </div>
  <input
    class="form-control"
    type="text"
    [disabled]="isDisabled"
    [ngModelOptions]="{ standalone: true }"
    [ngModel]="currentValue"
    (ngModelChange)="valueChange($event)"
  />
</div>

results matching ""

    No results matching ""