Skip to content

Commit

Permalink
fix: input number editable when disabled
Browse files Browse the repository at this point in the history
Co-authored-by: smeligrana <admin@example.com>
  • Loading branch information
smeligrana and smeligrana authored Nov 23, 2023
1 parent 981c006 commit 364fac6
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
[step]="step ?? null"
[min]="min ?? null"
[max]="max ?? null"
[class.form-control]="readonly !== 'plaintext'"
[class.form-control-plaintext]="readonly === 'plaintext'"
[class.is-invalid]="isInvalid"
[class.is-valid]="isValid"
[formControl]="control"
Expand All @@ -34,10 +36,10 @@
[attr.aria-describedby]="id + '-description'"
(blur)="markAsTouched()" />

<button type="button" class="input-number-add" (click)="incrementNumber()">
<button type="button" class="input-number-add" [disabled]="!control.enabled" (click)="incrementNumber()">
<span class="visually-hidden">{{'it.form.increase-value' | translate}}</span>
</button>
<button type="button" class="input-number-sub" (click)="incrementNumber(true)">
<button type="button" class="input-number-sub" [disabled]="!control.enabled" (click)="incrementNumber(true)">
<span class="visually-hidden">{{'it.form.decrease-value' | translate}}</span>
</button>
</span>
Expand Down

1 comment on commit 364fac6

@vercel
Copy link

@vercel vercel bot commented on 364fac6 Nov 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.