Skip to content

Commit

Permalink
Fixed #15885 - InputNumberModule: Variant filled is not applied
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Jul 18, 2024
1 parent 4382349 commit 768f7a1
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/app/components/inputnumber/inputnumber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
numberAttribute
} from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
import { PrimeTemplate, SharedModule } from 'primeng/api';
import { PrimeNGConfig, PrimeTemplate, SharedModule } from 'primeng/api';
import { AutoFocusModule } from 'primeng/autofocus';
import { ButtonModule } from 'primeng/button';
import { DomHandler } from 'primeng/dom';
Expand Down Expand Up @@ -98,6 +98,7 @@ export const INPUTNUMBER_VALUE_ACCESSOR: any = {
[attr.data-pc-section]="'input'"
pAutoFocus
[autofocus]="autofocus"
[class.p-variant-filled]="variant === 'filled' || config.inputStyle() === 'filled'"
/>
<ng-container *ngIf="buttonLayout != 'vertical' && showClear && value">
<TimesIcon *ngIf="!clearIconTemplate" [ngClass]="'p-inputnumber-clear-icon'" (click)="clear()" [attr.data-pc-section]="'clearIcon'" />
Expand Down Expand Up @@ -516,12 +517,7 @@ export class InputNumber implements OnInit, AfterContentInit, OnChanges, Control

private ngControl: NgControl | null = null;

constructor(
@Inject(DOCUMENT) private document: Document,
public el: ElementRef,
private cd: ChangeDetectorRef,
private readonly injector: Injector
) {}
constructor(@Inject(DOCUMENT) private document: Document, public el: ElementRef, private cd: ChangeDetectorRef, private readonly injector: Injector, public config: PrimeNGConfig) {}

ngOnChanges(simpleChange: SimpleChanges) {
const props = ['locale', 'localeMatcher', 'mode', 'currency', 'currencyDisplay', 'useGrouping', 'minFractionDigits', 'maxFractionDigits', 'prefix', 'suffix'];
Expand Down

0 comments on commit 768f7a1

Please sign in to comment.