We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5cacbdb commit e16aa4dCopy full SHA for e16aa4d
packages/@internationalized/number/src/NumberParser.ts
@@ -164,9 +164,9 @@ class NumberParserImpl {
164
// extra step for rounding percents to what our formatter would output
165
let options = {
166
...this.options,
167
- style: 'decimal',
168
- minimumFractionDigits: Math.min(this.options.minimumFractionDigits + 2, 20),
169
- maximumFractionDigits: Math.min(this.options.maximumFractionDigits + 2, 20)
+ style: 'decimal' as const,
+ minimumFractionDigits: Math.min((this.options.minimumFractionDigits ?? 0) + 2, 20),
+ maximumFractionDigits: Math.min((this.options.maximumFractionDigits ?? 0) + 2, 20)
170
};
171
return (new NumberParser(this.locale, options)).parse(new NumberFormatter(this.locale, options).format(newValue));
172
}
0 commit comments