Skip to content

Commit

Permalink
fix: fixed input-group-text on input component when prependText conte…
Browse files Browse the repository at this point in the history
…nt is dynamic
  • Loading branch information
AntoninoBonanno committed Jan 17, 2024
1 parent 54ae4ef commit 19930c5
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
[class.input-number-currency]="currency"
[class.input-number-percentage]="percentage"
[class.input-number-adaptive]="adaptive">

<span class="input-group-text" #prependText [class.d-none]="!prependText.hasChildNodes()">
<span class="input-group-text" #prependText>
<ng-content select="[prependText]"></ng-content>
</span>

Expand All @@ -16,7 +15,7 @@
[for]="id"
[class.active]="isActiveLabel"
[class.input-number-label]="type === 'number'"
[class.empty-prepend-label]="!prependText.hasChildNodes()">
[class.empty-prepend-label]="!prependText.clientWidth">
{{ label }}
</label>

Expand All @@ -26,8 +25,8 @@
type="number"
[id]="id"
[step]="step ?? null"
[min]="min ?? null"
[max]="max ?? null"
[min]="min ?? ''"
[max]="max ?? ''"
[class.form-control]="readonly !== 'plaintext'"
[class.form-control-plaintext]="readonly === 'plaintext'"
[class.is-invalid]="isInvalid"
Expand Down

0 comments on commit 19930c5

Please sign in to comment.