File

src/ui/tristate-checkbox/smart-tristate-checkbox.component.ts

Implements

ControlValueAccessor OnInit OnChanges

Metadata

Index

Methods
Inputs
Outputs

Inputs

disabled
Type : boolean
indeterminate
Type : boolean
ngModel
Type : boolean | null | undefined

Outputs

blur
Type : EventEmitter<void>
focus
Type : EventEmitter<void>
ngModelChange
Type : EventEmitter<boolean | null | undefined>

Methods

onBlur
onBlur()
Returns : void
onFocus
onFocus()
Returns : void
onValueChange
onValueChange(value: boolean)
Parameters :
Name Type Optional
value boolean No
Returns : void
registerOnChange
registerOnChange(fn: any)
Parameters :
Name Type Optional
fn any No
Returns : void
registerOnTouched
registerOnTouched(fn: any)
Parameters :
Name Type Optional
fn any No
Returns : void
Optional setDisabledState
setDisabledState(isDisabled: boolean)
Parameters :
Name Type Optional
isDisabled boolean No
Returns : void
writeValue
writeValue(obj: any)
Parameters :
Name Type Optional
obj any No
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;
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""