Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
Added componentDidMount for filling input field by default value
Browse files Browse the repository at this point in the history
  • Loading branch information
Кузьменко Андрей Сергеевич authored and Кузьменко Андрей Сергеевич committed Jun 19, 2019
1 parent 6ca4197 commit 99161aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/MaskedInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export default class FormInputComponent extends Component<Props> {
rules: []
};

componentDidMount() {
this.setValue(this._getDisplayValue());
}

componentWillReceiveProps(nextProps: Props) {
if (!this.props.mask) return null;
if (
Expand Down

0 comments on commit 99161aa

Please sign in to comment.