Skip to content

Commit

Permalink
fix(module:input-number): correctly render the feedback icon (#8910)
Browse files Browse the repository at this point in the history
  • Loading branch information
HyperLife1119 authored Dec 5, 2024
1 parent 4fa4658 commit 2bddb8c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/input-number/input-number.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,12 @@ import { NZ_SPACE_COMPACT_ITEM_TYPE, NZ_SPACE_COMPACT_SIZE, NzSpaceCompactItemDi
</span>
}
<ng-template [ngTemplateOutlet]="inputNumber" />
@if (suffix()) {
@if (suffix() || hasFeedback()) {
<span class="ant-input-number-suffix">
<ng-content select="[nzInputSuffix]"></ng-content>
@if (hasFeedback() && finalStatus().signal()) {
<nz-form-item-feedback-icon [status]="finalStatus().signal()" />
}
</span>
}
</ng-template>
Expand Down Expand Up @@ -152,9 +155,6 @@ import { NZ_SPACE_COMPACT_ITEM_TYPE, NZ_SPACE_COMPACT_SIZE, NzSpaceCompactItemDi
(change)="onInputChange($event)"
/>
</div>
@if (hasFeedback() && finalStatus().signal()) {
<nz-form-item-feedback-icon class="ant-input-number-suffix" [status]="finalStatus().signal()" />
}
</ng-template>
`,
providers: [
Expand Down Expand Up @@ -237,7 +237,7 @@ export class NzInputNumberComponent implements OnInit, ControlValueAccessor {
protected suffix = contentChild(NzInputSuffixDirective);
protected addonBefore = contentChild(NzInputAddonBeforeDirective);
protected addonAfter = contentChild(NzInputAddonAfterDirective);
protected hasAffix = computed(() => !!this.prefix() || !!this.suffix());
protected hasAffix = computed(() => !!this.prefix() || !!this.suffix() || this.hasFeedback());
protected hasAddon = computed(() => !!this.addonBefore() || !!this.addonAfter());

protected class = computed(() => {
Expand Down

0 comments on commit 2bddb8c

Please sign in to comment.