Skip to content

Commit

Permalink
fix: primefaces#15264 use null as fallbackValue for input transform o…
Browse files Browse the repository at this point in the history
…f minFractionDigits and maxFractionDigits
  • Loading branch information
pschult committed Apr 15, 2024
1 parent 4f88444 commit dc1b795
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/app/components/inputnumber/inputnumber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,12 +371,12 @@ export class InputNumber implements OnInit, AfterContentInit, OnChanges, Control
* The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the ISO 4217 currency code list (2 if the list doesn't provide that information).
* @group Props
*/
@Input({ transform: numberAttribute }) minFractionDigits: number | undefined;
@Input({ transform: (value: unknown) => numberAttribute(value, null) }) minFractionDigits: number | undefined;
/**
* The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the ISO 4217 currency code list (2 if the list doesn't provide that information).
* @group Props
*/
@Input({ transform: numberAttribute }) maxFractionDigits: number | undefined;
@Input({ transform: (value: unknown) => numberAttribute(value, null) }) maxFractionDigits: number | undefined;
/**
* Text to display before the value.
* @group Props
Expand Down
8 changes: 4 additions & 4 deletions src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5169,12 +5169,12 @@ export class ColumnFilter implements AfterContentInit {
* Defines minimum fraction of digits.
* @group Props
*/
@Input({ transform: numberAttribute }) minFractionDigits: number | undefined;
@Input({ transform: (value: unknown) => numberAttribute(value, null) }) minFractionDigits: number | undefined;
/**
* Defines maximum fraction of digits.
* @group Props
*/
@Input({ transform: numberAttribute }) maxFractionDigits: number | undefined;
@Input({ transform: (value: unknown) => numberAttribute(value, null) }) maxFractionDigits: number | undefined;
/**
* Defines prefix of the filter.
* @group Props
Expand Down Expand Up @@ -5807,9 +5807,9 @@ export class ColumnFilterFormElement implements OnInit {

@Input() placeholder: string | undefined;

@Input({ transform: numberAttribute }) minFractionDigits: number | undefined;
@Input({ transform: (value: unknown) => numberAttribute(value, null) }) minFractionDigits: number | undefined;

@Input({ transform: numberAttribute }) maxFractionDigits: number | undefined;
@Input({ transform: (value: unknown) => numberAttribute(value, null) }) maxFractionDigits: number | undefined;

@Input() prefix: string | undefined;

Expand Down

0 comments on commit dc1b795

Please sign in to comment.