getFieldDecorator on change key and value
See original GitHub issueThis is not working
getFieldDecorator on change key and value
handleSelectChange(e){
this.props.form.setFieldsValue({
[e.target.name]: e.target.value,
});
}
<FormItem {...formItemLayout} label="name)"> {getFieldDecorator('freight', {rules: [{ required: true, message: 'Please input your name!' }], onChange:this.handleSelectChange, })( <Input /> )} </FormItem>
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
how to get field value on change for FormItem in antd
Basically, changing the onChange from the getFieldDecorator helper ... with antd's natural behavior, but gets the value and change on state.
Read more >Form - Ant Design
Get the value of a field. Function(fieldName: string). isFieldsTouched, Check whether any of fields is touched by getFieldDecorator 's options.trigger ...
Read more >Form - Ant Design - API Manual
onFieldsChange, Specify a function that will be called when the value a Form.Item gets changed. Usage example: saving the field's value to Redux...
Read more >ant-design/ant-design-english - Gitter
{countryOp.map(coun => <Option key={coun.value} ... because function getFieldDecorator only have one props as your input parameter ,but there are more than ...
Read more >antd form item checkbox | The AI Search Engine You Control
Steps to reproduce. Dynamic form item set value, ` const formItems = keys.map((k, index) => { return ( {getFieldDecorator( minAmount ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same as: https://github.com/ant-design/ant-design/issues/4777#issuecomment-278207421
Hi. How we can get event from inputs? So I got <InputNumber min={1000} max={5000}> and ofcourse I can’t type in more/less than is in min/max. However if I type by manually it’s possible 😃 So I’d like to know how can I get min/max values from InputNumber and send to my changeHandler method and prevent typing by manually
if(min > e.min && e.max < max) return false;