mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 03:29:59 +08:00
Remove sCU from Form (#10029)
Related #9790 Form and Form.Item are not considered as pure components
This commit is contained in:
parent
d7f9270a6f
commit
61e4f8011a
@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import createDOMForm from 'rc-form/lib/createDOMForm';
|
||||
import createFormField from 'rc-form/lib/createFormField';
|
||||
import PureRenderMixin from 'rc-util/lib/PureRenderMixin';
|
||||
import omit from 'omit.js';
|
||||
import warning from '../_util/warning';
|
||||
import FormItem from './FormItem';
|
||||
@ -163,10 +162,6 @@ export default class Form extends React.Component<FormProps, any> {
|
||||
warning(!props.form, 'It is unnecessary to pass `form` to `Form` after antd@1.7.0.');
|
||||
}
|
||||
|
||||
shouldComponentUpdate(...args: any[]) {
|
||||
return PureRenderMixin.shouldComponentUpdate.apply(this, args);
|
||||
}
|
||||
|
||||
getChildContext() {
|
||||
const { layout } = this.props;
|
||||
return {
|
||||
|
@ -3,7 +3,6 @@ import * as ReactDOM from 'react-dom';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import Animate from 'rc-animate';
|
||||
import PureRenderMixin from 'rc-util/lib/PureRenderMixin';
|
||||
import Row from '../grid/row';
|
||||
import Col, { ColProps } from '../grid/col';
|
||||
import warning from '../_util/warning';
|
||||
@ -66,10 +65,6 @@ export default class FormItem extends React.Component<FormItemProps, any> {
|
||||
);
|
||||
}
|
||||
|
||||
shouldComponentUpdate(...args: any[]) {
|
||||
return PureRenderMixin.shouldComponentUpdate.apply(this, args);
|
||||
}
|
||||
|
||||
getHelpMsg() {
|
||||
const props = this.props;
|
||||
const onlyControl = this.getOnlyControl();
|
||||
|
Loading…
Reference in New Issue
Block a user