mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +08:00
fix: infinite loop, ref: #3759
This commit is contained in:
parent
c72612435e
commit
5782253a0f
@ -1,12 +1,12 @@
|
||||
import React from 'react';
|
||||
import { PropTypes } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import createDOMForm from 'rc-form/lib/createDOMForm';
|
||||
import PureRenderMixin from 'rc-util/lib/PureRenderMixin';
|
||||
import omit from 'omit.js';
|
||||
import warning from 'warning';
|
||||
import assign from 'object-assign';
|
||||
import warning from '../_util/warning';
|
||||
import FormItem from './FormItem';
|
||||
import createDOMForm from 'rc-form/lib/createDOMForm';
|
||||
import { FIELD_META_PROP } from './constants';
|
||||
|
||||
export interface FormCreateOption {
|
||||
@ -121,14 +121,14 @@ export default class Form extends React.Component<FormProps, any> {
|
||||
};
|
||||
},
|
||||
componentWillMount() {
|
||||
this.getFieldProps = this.deprecatedGetFieldProps;
|
||||
this.__getFieldProps = this.props.form.getFieldProps;
|
||||
},
|
||||
deprecatedGetFieldProps(name, option) {
|
||||
warning(
|
||||
false,
|
||||
'`getFieldProps` is not recommended, please use `getFieldDecorator` instead'
|
||||
);
|
||||
return this.getFieldProps(name, option);
|
||||
return this.__getFieldProps(name, option);
|
||||
},
|
||||
render() {
|
||||
this.props.form.getFieldProps = this.deprecatedGetFieldProps;
|
||||
|
Loading…
Reference in New Issue
Block a user