mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 08:52:34 +00:00
Support roundingMode for InputNumber (#4946)
This commit is contained in:
parent
f16bd6ab2e
commit
078a30720c
3 changed files with 37 additions and 3 deletions
16
components/lib/inputnumber/InputNumber.d.ts
vendored
16
components/lib/inputnumber/InputNumber.d.ts
vendored
|
@ -14,6 +14,17 @@ import { InputTextPassThroughOptions } from '../inputtext';
|
|||
import { PassThroughOptions } from '../passthrough';
|
||||
import { ClassComponent, GlobalComponentConstructor, Nullable, PassThrough } from '../ts-helpers';
|
||||
|
||||
export declare type RoundingMode =
|
||||
| 'ceil'
|
||||
| 'floor'
|
||||
| 'expand'
|
||||
| 'trunc'
|
||||
| 'halfCeil'
|
||||
| 'halfFloor'
|
||||
| 'halfExpand'
|
||||
| 'halfTrunc'
|
||||
| 'halfEven';
|
||||
|
||||
export declare type InputNumberPassThroughOptionType<T = any> = InputNumberPassThroughAttributes | ((options: InputNumberPassThroughMethodOptions<T>) => InputNumberPassThroughAttributes | string) | string | null | undefined;
|
||||
|
||||
/**
|
||||
|
@ -232,6 +243,11 @@ export interface InputNumberProps {
|
|||
* the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the [ISO 4217 currency code](https://www.six-group.com/en/products-services/financial-information/data-standards.html#scrollTo=maintenance-agency) list (2 if the list doesn't provide that information).
|
||||
*/
|
||||
maxFractionDigits?: number | undefined;
|
||||
/**
|
||||
* How decimals should be rounded.
|
||||
* The default value is `"halfExpand"`, [further information](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#roundingmode).
|
||||
*/
|
||||
roundingMode?: RoundingMode;
|
||||
/**
|
||||
* Mininum boundary value.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue