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

atinc / ngx-tethys / 0bbb2cec-209e-4d8a-b1b3-6bc54e05daa6

04 Sep 2023 08:40AM UTC coverage: 15.616% (-74.6%) from 90.2%
0bbb2cec-209e-4d8a-b1b3-6bc54e05daa6

Pull #2829

circleci

cmm-va
fix: add test
Pull Request #2829: fix: add tabIndex

300 of 6386 branches covered (0.0%)

Branch coverage included in aggregate %.

78 of 78 new or added lines in 26 files covered. (100.0%)

2849 of 13779 relevant lines covered (20.68%)

83.41 hits per line

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

20.0
/src/form/form-group-error/form-group-error.component.ts
1
import { InputBoolean } from 'ngx-tethys/core';
2
import { Component, HostBinding, ViewEncapsulation, OnInit, Optional, Input } from '@angular/core';
3
import { ThyFormDirective } from '../form.directive';
4
import { ThyAlertComponent } from 'ngx-tethys/alert';
5
import { NgClass, NgFor } from '@angular/common';
6

7
/**
8
 * @name thy-form-group-error
9
 * @order 50
10
 */
11
@Component({
12
    selector: 'thy-form-group-error',
1✔
13
    templateUrl: './form-group-error.component.html',
14
    encapsulation: ViewEncapsulation.None,
×
15
    standalone: true,
16
    imports: [NgClass, NgFor, ThyAlertComponent]
17
})
×
18
export class ThyFormGroupErrorComponent implements OnInit {
×
19
    public errors: string[];
20

21
    @Input() @InputBoolean() thyShowFirst = true;
×
22

23
    /**
24
     * @type string[]
×
25
     */
×
26
    @Input()
×
27
    set thyErrors(errors: string[]) {
28
        this.errors = errors;
29
    }
×
30

×
31
    get thyErrors() {
32
        const errors = this.errors || this.thyParentForm.validator.errors;
33
        return errors && errors.length > 0 && this.thyShowFirst ? [errors[0]] : errors;
1✔
34
    }
35

36
    @HostBinding('class.form-group')
1✔
37
    get _isFormGroup() {
38
        return this.thyErrors && this.thyErrors.length > 0;
39
    }
40

41
    @HostBinding('class.row') isHorizontal = true;
42

43
    constructor(@Optional() private thyParentForm: ThyFormDirective) {}
1✔
44

45
    ngOnInit() {
46
        if (this.thyParentForm) {
47
            this.isHorizontal = this.thyParentForm.isHorizontal;
1✔
48
        }
49
    }
50
}
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