src/ui/radio-set/smart-radio-set.component.ts
| changeDetection | ChangeDetectionStrategy.Eager |
| selector | smart-radio-set |
| styleUrls | ./smart-radio-set.component.css |
| templateUrl | ./smart-radio-set.component.html |
Properties |
Methods |
Inputs |
Outputs |
Accessors |
constructor(elementRef: ElementRef, zone: NgZone, changeDetector: ChangeDetectorRef)
|
||||||||||||
|
Parameters :
|
| disabled |
Type : boolean
|
| id |
Type : string
|
| orientation |
Type : string
|
|
Sets the orientation of the radio set |
| smart-help-url |
Type : string
|
| smartModel |
Type : string
|
| style |
Type : any
|
| value-list |
Type : string[]
|
| smartModelChange |
Type : EventEmitter<string>
|
| clear |
clear()
|
|
Returns :
void
|
| getNativeProperty | ||||||
getNativeProperty(propertyName: string)
|
||||||
|
Parameters :
Returns :
any
|
| Public onValueChanged |
onValueChanged(event: any, key: string)
|
|
Returns :
void
|
| setNativeProperty |
setNativeProperty(propertyName: string, value: any)
|
|
Returns :
void
|
| visible |
Type : unknown
|
Default value : true
|
| disabled | ||||||
getdisabled()
|
||||||
|
|
||||||
setdisabled(value: boolean)
|
||||||
|
Parameters :
Returns :
void
|
| orientation | ||||||||
getorientation()
|
||||||||
|
Gets the current orientation of the radio set
Returns :
string
|
||||||||
setorientation(value: string)
|
||||||||
|
Sets the orientation of the radio set
Parameters :
Returns :
void
|
| ngModel | ||||||
getngModel()
|
||||||
|
Returns :
string
|
||||||
setngModel(value: string)
|
||||||
|
Parameters :
Returns :
void
|
| helpUrl | ||||||
gethelpUrl()
|
||||||
sethelpUrl(value: string)
|
||||||
|
Parameters :
Returns :
void
|
| radioItems | ||||||
getradioItems()
|
||||||
|
Returns :
RadioItem[]
|
||||||
setradioItems(value: RadioItem[])
|
||||||
|
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-radio-set.component.html
Purpose : Template for Smart Radio Set.
Author(s) : oana
Created : Jul 26, 2019
--------------------------------------------------------------------------
-->
<div [ngClass]="cssClasses()" [ngStyle]="style || {}" [hidden]="!visible" >
@for (r of radioItems; track $index) {
<div class="d-flex flex-row gap-1 align-items-center">
<input
type="radio"
name="group"
size="small"
#radioInput
[id]="'radio'+$index"
kendoRadioButton
[value]="r.key"
[disabled]="disabled"
(change)="onValueChanged($event, r.key)"
[ngModel]="ngModel"
/>
<kendo-label class="radio-input-label" [for]="'radio'+$index" [text]="r.value"></kendo-label>
</div>
}
</div>
./smart-radio-set.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-radio-set.component.css
Purpose : Styles for Smart Radio Set.
Author(s) : oana
Created : Jul 26, 2019
----------------------------------------------------------------------*/
.horizontal {
display: inline;
}
.k-form-field.vertical {
display: block !important;
}
.k-form-field > div {
display: flex;
flex-direction: row;
}
input[type="radio"] {
vertical-align: text-bottom;
align-self: center;
}
kendo-label.radio-input-label {
flex: 1;
}
kendo-label.radio-input-label .k-label {
display: block !important;
}