question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getFieldDecorator on change key and value

See original GitHub issue

This 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:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

0reactions
sebekgrcommented, Mar 16, 2018

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;

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found