Skip to content

Commit

Permalink
fix: infinite loop, ref: #3759
Browse files Browse the repository at this point in the history
  • Loading branch information
benjycui committed Nov 9, 2016
1 parent 449a982 commit 5995aef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/form/Form.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5995aef

Please sign in to comment.