interval-picker/interval-picker.component.ts
providers |
{
provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => IntervalPickerComponent), multi: true
}
|
selector | c8y-interval-picker |
standalone | true |
imports |
CommonModule
FormsModule
A11yModule
ReactiveFormsModule
BsDropdownModule
|
templateUrl | ./interval-picker.component.html |
Properties |
Methods |
Inputs |
constructor(translate: TranslateService)
|
||||||
Parameters :
|
INTERVALS |
Type : Interval[] | AlarmFilterInterval[]
|
Default value : INTERVALS
|
markAsTouched |
markAsTouched()
|
Returns :
void
|
ngOnInit |
ngOnInit()
|
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
|
onChange |
Default value : () => {...}
|
onTouched |
Default value : () => {...}
|
touched |
Default value : false
|
translatedIntervals |
Type : literal type[]
|
Default value : []
|
value |
<li
*ngFor="let interval of translatedIntervals"
[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 }}
</span>
</button>
</li>