diff --git a/components/lib/inputnumber/BaseInputNumber.vue b/components/lib/inputnumber/BaseInputNumber.vue index 5dcf61c9b..d0f49ea06 100644 --- a/components/lib/inputnumber/BaseInputNumber.vue +++ b/components/lib/inputnumber/BaseInputNumber.vue @@ -82,17 +82,7 @@ export default { type: String, default: 'halfExpand', validator(value) { - return [ - 'ceil', - 'floor', - 'expand', - 'trunc', - 'halfCeil', - 'halfFloor', - 'halfExpand', - 'halfTrunc', - 'halfEven' - ].includes(value); + return ['ceil', 'floor', 'expand', 'trunc', 'halfCeil', 'halfFloor', 'halfExpand', 'halfTrunc', 'halfEven'].includes(value); } }, min: { diff --git a/components/lib/inputnumber/InputNumber.d.ts b/components/lib/inputnumber/InputNumber.d.ts index f5f7cfbb7..360ca273c 100755 --- a/components/lib/inputnumber/InputNumber.d.ts +++ b/components/lib/inputnumber/InputNumber.d.ts @@ -14,16 +14,7 @@ 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 RoundingMode = 'ceil' | 'floor' | 'expand' | 'trunc' | 'halfCeil' | 'halfFloor' | 'halfExpand' | 'halfTrunc' | 'halfEven'; export declare type InputNumberPassThroughOptionType = InputNumberPassThroughAttributes | ((options: InputNumberPassThroughMethodOptions) => InputNumberPassThroughAttributes | string) | string | null | undefined; diff --git a/components/lib/inputnumber/InputNumber.vue b/components/lib/inputnumber/InputNumber.vue index 06ac9faae..66625842f 100755 --- a/components/lib/inputnumber/InputNumber.vue +++ b/components/lib/inputnumber/InputNumber.vue @@ -182,7 +182,7 @@ export default { useGrouping: this.useGrouping, minimumFractionDigits: this.minFractionDigits, maximumFractionDigits: this.maxFractionDigits, - roundingMode: this.roundingMode, + roundingMode: this.roundingMode }; }, constructParser() { diff --git a/doc/common/apidoc/index.json b/doc/common/apidoc/index.json index c28f51c96..f4ee860f7 100644 --- a/doc/common/apidoc/index.json +++ b/doc/common/apidoc/index.json @@ -19747,7 +19747,7 @@ "name": "columnResizeMode", "optional": true, "readonly": false, - "type": "\"fit\" | \"expand\"", + "type": "\"expand\" | \"fit\"", "default": "fit", "description": "Defines whether the overall table width." }, @@ -30407,6 +30407,14 @@ "default": "", "description": "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;\nthe 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)." }, + { + "name": "roundingMode", + "optional": true, + "readonly": false, + "type": "RoundingMode", + "default": "", + "description": "How decimals should be rounded.\nThe default value is `\"halfExpand\"` , [further information](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#roundingmode)." + }, { "name": "min", "optional": true, @@ -30645,6 +30653,9 @@ "types": { "description": "Defines the custom types used by the module.", "values": { + "RoundingMode": { + "values": "\"ceil\" | \"floor\" | \"expand\" | \"trunc\" | \"halfCeil\" | \"halfFloor\" | \"halfExpand\" | \"halfTrunc\" | \"halfEven\"" + }, "InputNumberPassThroughOptionType": { "values": "InputNumberPassThroughAttributes | (options: InputNumberPassThroughMethodOptions) => undefined | string | null | undefined" } @@ -56218,7 +56229,7 @@ "name": "columnResizeMode", "optional": true, "readonly": false, - "type": "\"fit\" | \"expand\"", + "type": "\"expand\" | \"fit\"", "default": "fit", "description": "Defines whether the overall table width should change on column resize." },