Skip to content

Commit fde20af

Browse files
authored
Fix #7977: InputNumber also check maxFractionDigits (#8036)
1 parent 61188d6 commit fde20af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

components/lib/inputnumber/InputNumber.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const InputNumber = React.memo(
4949
const stacked = props.showButtons && props.buttonLayout === 'stacked';
5050
const horizontal = props.showButtons && props.buttonLayout === 'horizontal';
5151
const vertical = props.showButtons && props.buttonLayout === 'vertical';
52-
const inputMode = props.inputMode || (props.mode === 'decimal' && !props.minFractionDigits ? 'numeric' : 'decimal');
52+
const inputMode = props.inputMode || (props.mode === 'decimal' && !props.minFractionDigits && !props.maxFractionDigits ? 'numeric' : 'decimal');
5353

5454
const getOptions = () => {
5555
return {

0 commit comments

Comments
 (0)