core/dashboard/wiget-time-context/interval-picker/interval-picker.component.ts
ControlValueAccessor
providers |
{
provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => IntervalPickerComponent), multi: true
}
|
selector | c8y-interval-picker |
templateUrl | ./interval-picker.component.html |
Properties |
Methods |
markAsTouched |
markAsTouched()
|
Returns :
void
|
registerOnChange | ||||||
registerOnChange(fn: any)
|
||||||
Parameters :
Returns :
void
|
registerOnTouched | ||||||
registerOnTouched(onTouched: any)
|
||||||
Parameters :
Returns :
void
|
setDisabledState | ||||||
setDisabledState(disabled: boolean)
|
||||||
Parameters :
Returns :
void
|
writeValue | ||||
writeValue(value)
|
||||
Parameters :
Returns :
void
|
disabled |
Default value : false
|
INTERVALS |
Default value : INTERVALS
|
onChange |
Default value : () => {...}
|
onTouched |
Default value : () => {...}
|
touched |
Default value : false
|
value |
<li
*ngFor="let interval of INTERVALS"
[ngClass]="{
active: interval.id === value
}"
>
<button
type="button"
(click)="onChange(interval.id)"
>
<span
[ngClass]="{
'text-primary': interval.id === value
}"
>
<span
c8yIcon="check"
[ngStyle]="{ visibility: interval.id === value ? 'visible' : 'hidden' }"
></span>
{{ interval.title | translate }}
</span>
</button>
</li>