mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-12 04:13:13 +08:00
doc: update input documentation
https://stackoverflow.com/questions/52378848/why-is-there-no-onchange-for-input-in-ant-design/52378880
This commit is contained in:
parent
9e9b18c760
commit
05646e9459
@ -28,6 +28,7 @@ Keyboard and mouse can be used for providing or changing data.
|
||||
| suffix | The suffix icon for the Input. | string\|ReactNode | |
|
||||
| type | The type of input, see: [MDN](https://developer.mozilla.org/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types)(use `Input.TextArea` instead of `type="textarea"`) | string | `text` |
|
||||
| value | The input content value | string | |
|
||||
| onChange | callback when user input | function(e) | |
|
||||
| onPressEnter | The callback function that is triggered when Enter key is pressed. | function(e) | |
|
||||
|
||||
> When `Input` is used in a `Form.Item` context, if the `Form.Item` has the `id` and `options` props defined
|
||||
|
@ -28,6 +28,7 @@ title: Input
|
||||
| suffix | 带有后缀图标的 input | string\|ReactNode | |
|
||||
| type | 声明 input 类型,同原生 input 标签的 type 属性,见:[MDN](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/input#属性)(请直接使用 `Input.TextArea` 代替 `type="textarea"`)。 | string | `text` |
|
||||
| value | 输入框内容 | string | |
|
||||
| onChange | 输入框内容变化时的回调 | function(e) | |
|
||||
| onPressEnter | 按下回车的回调 | function(e) | |
|
||||
|
||||
> 如果 `Input` 在 `Form.Item` 内,并且 `Form.Item` 设置了 `id` 和 `options` 属性,则 `value` `defaultValue` 和 `id` 属性会被自动设置。
|
||||
|
Loading…
Reference in New Issue
Block a user