mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 03:59:01 +08:00
🆙 Upgrade rc-input-number (#18346)
* fix react warning #9792 * support onPressEnter close #12476 close #16080
This commit is contained in:
parent
a5f1fc80fd
commit
c9cef60d89
@ -27,6 +27,7 @@ When a numeric value needs to be provided.
|
||||
| step | The number to which the current value is increased or decreased. It can be an integer or decimal. | number\|string | 1 | |
|
||||
| value | current value | number | | |
|
||||
| onChange | The callback triggered when the value is changed. | function(value: number \| string) | | |
|
||||
| onPressEnter | The callback function that is triggered when Enter key is pressed. | function(e) | | |
|
||||
|
||||
## Methods
|
||||
|
||||
|
@ -29,6 +29,7 @@ export interface InputNumberProps
|
||||
name?: string;
|
||||
id?: string;
|
||||
precision?: number;
|
||||
onPressEnter?: React.KeyboardEventHandler<HTMLInputElement>;
|
||||
}
|
||||
|
||||
export default class InputNumber extends React.Component<InputNumberProps, any> {
|
||||
|
@ -30,6 +30,7 @@ title: InputNumber
|
||||
| step | 每次改变步数,可以为小数 | number\|string | 1 | |
|
||||
| value | 当前值 | number | | |
|
||||
| onChange | 变化回调 | Function(value: number \| string) | | |
|
||||
| onPressEnter | 按下回车的回调 | function(e) | | |
|
||||
|
||||
## 方法
|
||||
|
||||
|
@ -68,7 +68,7 @@
|
||||
"rc-dropdown": "~2.4.1",
|
||||
"rc-editor-mention": "^1.1.13",
|
||||
"rc-form": "^2.4.5",
|
||||
"rc-input-number": "~4.4.5",
|
||||
"rc-input-number": "~4.5.0",
|
||||
"rc-mentions": "~0.4.0",
|
||||
"rc-menu": "~7.4.23",
|
||||
"rc-notification": "~3.3.1",
|
||||
|
Loading…
Reference in New Issue
Block a user