mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 23:15:43 +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() {
|
||||
this.setState({ user: { ...this.props.user } });
|
||||
const { user } = this.props;
|
||||
if (user) {
|
||||
this.setState({ user: { ...user } });
|
||||
}
|
||||
}
|
||||
|
||||
isValid = () => {
|
||||
|
||||
Reference in New Issue
Block a user