Skip to content

Commit

Permalink
remove state.helpShow
Browse files Browse the repository at this point in the history
  • Loading branch information
jljsj33 committed May 10, 2018
1 parent 3810126 commit 57febfe
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions components/form/FormItem.tsx
Expand Up @@ -55,8 +55,6 @@ export default class FormItem extends React.Component<FormItemProps, any> {

context: FormItemContext;

state = { helpShow: false };

helpShow = false;

componentDidMount() {
Expand Down Expand Up @@ -128,7 +126,7 @@ export default class FormItem extends React.Component<FormItemProps, any> {
onHelpAnimEnd = (_key: string, helpShow: boolean) => {
this.helpShow = helpShow;
if (!helpShow) {
this.setState({ helpShow });
this.setState({});
}
}

Expand Down Expand Up @@ -314,7 +312,7 @@ export default class FormItem extends React.Component<FormItemProps, any> {
const style = props.style;
const itemClassName = {
[`${prefixCls}-item`]: true,
[`${prefixCls}-item-with-help`]: this.helpShow || this.state.helpShow,
[`${prefixCls}-item-with-help`]: this.helpShow,
[`${prefixCls}-item-no-colon`]: !props.colon,
[`${props.className}`]: !!props.className,
};
Expand Down

0 comments on commit 57febfe

Please sign in to comment.