Skip to content
This repository was archived by the owner on Mar 26, 2019. It is now read-only.

Commit 77dd085

Browse files
committed
update lifcycle method
1 parent 8db8cfa commit 77dd085

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/components/Input.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ class Input extends Component {
153153
helperText: this.props.helperText || ""
154154
};
155155

156-
componentDidMount = () => {
156+
componentDidMount() {
157157
this._getRef(this.input);
158-
};
158+
}
159159

160160
_onFocus = () => {
161161
this.setState({ focus: true });
@@ -300,10 +300,11 @@ class Input extends Component {
300300
/>
301301
{counter && <SCounter>{`${this.state.value.length} / ${maxLength}`}</SCounter>}
302302
</SContainer>
303-
{!noHelperText &&
303+
{!noHelperText && (
304304
<SHelperText error={this.state.error} show={this.state.error || !!helperText.length}>
305305
{this.state.helperText}
306-
</SHelperText>}
306+
</SHelperText>
307+
)}
307308
</div>
308309
);
309310
}

0 commit comments

Comments
 (0)