• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atinc / ngx-tethys / e384a89b-03c8-4022-8722-422e40f8c2d2

23 Oct 2023 02:25AM UTC coverage: 90.223% (+0.005%) from 90.218%
e384a89b-03c8-4022-8722-422e40f8c2d2

push

circleci

web-flow
fix(radio): fix radio group thyDisabled #INFR-9788 (#2858)

5169 of 6389 branches covered (0.0%)

Branch coverage included in aggregate %.

6 of 6 new or added lines in 2 files covered. (100.0%)

13047 of 13801 relevant lines covered (94.54%)

972.12 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.0
/src/radio/button/radio-button.component.ts
1
import { Component, OnInit, HostBinding, HostListener, Input, Optional, ChangeDetectorRef } from '@angular/core';
2
import { ThyTranslate } from 'ngx-tethys/core';
3
import { ThyRadioGroupComponent } from './../group/radio-group.component';
4
import { coerceBooleanProperty } from 'ngx-tethys/util';
5
import { ThyRadioComponent } from '../radio.component';
6

7
/**
8
 * @name [thy-radio-button],[thyRadioButton]
9
 */
10
@Component({
11
    // eslint-disable-next-line @angular-eslint/component-selector
1✔
12
    selector: '[thy-radio-button],[thyRadioButton]',
13
    templateUrl: './radio-button.component.html',
56✔
14
    standalone: true,
15
    host: {
16
        '[attr.tabindex]': `tabIndex`
16✔
17
    }
16✔
18
})
19
export class ThyRadioButtonComponent extends ThyRadioComponent implements OnInit {
20
    @HostBinding('class.btn') isButton = true;
7✔
21
    @HostBinding('class.active') isActive = false;
7✔
22
    @HostBinding('class.disabled') get isDisabled() {
7✔
23
        return this._disabled;
24
    }
25

7✔
26
    name: string;
7!
27

7✔
28
    @Input() thyValue: string;
7✔
29

30
    set thyChecked(value: boolean) {
31
        this.isActive = !!value;
32
        this.writeValue(coerceBooleanProperty(value));
1!
33
    }
×
34

35
    constructor(
36
        thyTranslate: ThyTranslate,
1✔
37
        @Optional() thyRadioGroupComponent: ThyRadioGroupComponent,
38
        changeDetectorRef: ChangeDetectorRef
39
    ) {
40
        super(thyTranslate, thyRadioGroupComponent, changeDetectorRef);
41
    }
1✔
42

43
    ngOnInit() {
44
        this._isFormCheck = false;
45
        if (this.thyRadioGroupComponent) {
46
            this.thyRadioGroupComponent.addRadio(this);
47
            this.thyRadioGroupComponent.setGroup();
48
        }
49
    }
1✔
50

51
    @HostListener('click', ['$event'])
52
    click($event: MouseEvent) {
53
        if (!this._disabled) {
54
            this.change();
55
        }
56
    }
57
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc