Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Dec 6, 2023
1 parent 177eb95 commit 35bedb8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/app/components/checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,15 @@ export const CHECKBOX_VALUE_ACCESSOR: any = {
[value]="value"
[attr.name]="name"
[checked]="checked()"
(focus)="onInputFocus($event)"
(blur)="onInputBlur($event)"
(change)="handleChange($event)"
[disabled]="disabled"
[attr.tabindex]="tabindex"
[disabled]="disabled"
[readonly]="readonly"
[attr.required]="required"
[attr.aria-labelledby]="ariaLabelledBy"
[attr.aria-label]="ariaLabel"
[attr.aria-checked]="checked()"
(focus)="onInputFocus($event)"
(blur)="onInputBlur($event)"
[attr.data-pc-section]="'hiddenInput'"
/>
</div>
Expand Down Expand Up @@ -250,13 +248,13 @@ export class Checkbox implements ControlValueAccessor {

onInputFocus(event: Event) {
this.focused = true;
this.onFocus.emit();
this.onFocus.emit(event);
}

onInputBlur(event: Event) {
this.focused = false;
this.onModelTouched();
this.onBlur.emit();
this.onBlur.emit(event);
}

writeValue(model: any): void {
Expand Down

0 comments on commit 35bedb8

Please sign in to comment.