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

atinc / ngx-tethys / d9ae709b-3c27-4b69-b125-b8b80b54f90b

pending completion
d9ae709b-3c27-4b69-b125-b8b80b54f90b

Pull #2757

circleci

mengshuicmq
fix: fix code review
Pull Request #2757: feat(color-picker): color-picker support disabled (#INFR-8645)

98 of 6315 branches covered (1.55%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

2392 of 13661 relevant lines covered (17.51%)

83.12 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

© 2025 Coveralls, Inc