src/ui/tristate-checkbox/smart-tristate-checkbox.component.ts
ControlValueAccessor
OnInit
OnChanges
| changeDetection | ChangeDetectionStrategy.Eager |
| providers |
SmartTristateCheckboxComponent
|
| selector | smart-tristate-checkbox |
| styleUrls | ./smart-tristate-checkbox.component.css |
| templateUrl | ./smart-tristate-checkbox.component.html |
Methods |
Inputs |
Outputs |
| disabled |
Type : boolean
|
| indeterminate |
Type : boolean
|
| ngModel |
Type : boolean | null | undefined
|
| blur |
Type : EventEmitter<void>
|
| focus |
Type : EventEmitter<void>
|
| ngModelChange |
Type : EventEmitter<boolean | null | undefined>
|
| onBlur |
onBlur()
|
|
Returns :
void
|
| onFocus |
onFocus()
|
|
Returns :
void
|
| onValueChange | ||||||
onValueChange(value: boolean)
|
||||||
|
Parameters :
Returns :
void
|
| registerOnChange | ||||||
registerOnChange(fn: any)
|
||||||
|
Parameters :
Returns :
void
|
| registerOnTouched | ||||||
registerOnTouched(fn: any)
|
||||||
|
Parameters :
Returns :
void
|
| Optional setDisabledState | ||||||
setDisabledState(isDisabled: boolean)
|
||||||
|
Parameters :
Returns :
void
|
| writeValue | ||||||
writeValue(obj: any)
|
||||||
|
Parameters :
Returns :
void
|
<!--
**************************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") - *
* www.consultingwerk.com and other contributors as listed *
* below. All Rights Reserved. *
* *
* Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY *
* KIND, either express or implied. *
* *
* Contributors: *
* *
**************************************************************************
--------------------------------------------------------------------------
File : smart-tristate-checkbox.component.html
Purpose : Template for Smart Tristate Checkbox.
Author(s) : Radu Nicoara
Created : Nov 02, 2022
--------------------------------------------------------------------------
-->
<input
type="checkbox"
[ngClass]="{ 'smart-checkbox': true, 'smart-checkbox-checked': ngModel === true, 'smart-checkbox-indeterminate': indeterminate }"
(blur)="onBlur()"
(focus)="onFocus()"
[ngModel]="ngModel"
(ngModelChange)="onValueChange($event)"
[indeterminate]="indeterminate"
[disabled]="disabled"
kendoCheckBox
/>
./smart-tristate-checkbox.component.css
/**********************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") - *
* www.consultingwerk.com and other contributors as listed *
* below. All Rights Reserved. *
* *
* Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY *
* KIND, either express or implied. *
* *
* Contributors: *
* *
**********************************************************************/
/*------------------------------------------------------------------------
File : smart-tristate-checkbox.component.css
Purpose : Styles for Smart Tristate Checkbox.
Author(s) : Radu Nicoara
Created : Nov 08, 2022
----------------------------------------------------------------------*/
input[kendoCheckbox].smart-checkbox-indeterminate:indeterminate {
border-color: #d8d8d8;
border-width: 3px;
color: #3f51b5;
background-image: unset;
background: #3f51b5;
width: 18px;
height: 18px;
}