Skip to content

Commit

Permalink
Merge pull request #16060 from primefaces/issue-15885
Browse files Browse the repository at this point in the history
Fixed #15885 - InputNumberModule: Variant filled is not applied
  • Loading branch information
cetincakiroglu authored Jul 18, 2024
2 parents 5df7895 + 768f7a1 commit fac41cd
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 fac41cd

Please sign in to comment.