ant-design/components/input-number/demo/digit.en-US.md

19 lines
416 B
Markdown
Raw Normal View History

2016-04-15 23:56:44 +08:00
---
order: 3
title: decimals
2016-04-15 23:56:44 +08:00
---
2016-04-15 23:39:39 +08:00
A numeric-only input box whose values can be increased or decreased using a decimal step. The number of decimals (also known as precision) is determined by the step prop.
2016-04-15 23:39:39 +08:00
````jsx
import { InputNumber } from 'antd';
function onChange(value) {
console.log('changed', value);
}
ReactDOM.render(
<InputNumber min={1} max={10} step={0.1} onChange={onChange} />
2016-04-15 23:39:39 +08:00
, mountNode);
````