mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 00:45:44 +01:00
fixed switch between controlled and uncontrolled input fields
This commit is contained in:
@@ -46,7 +46,10 @@ class UserForm extends React.Component<Props, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.setState({ user: { ...this.props.user } });
|
const { user } = this.props;
|
||||||
|
if (user) {
|
||||||
|
this.setState({ user: { ...user } });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
isValid = () => {
|
isValid = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user