prevent reloading after submit form

This commit is contained in:
Maren Süwer
2018-09-13 09:59:15 +02:00
parent 29b205292a
commit 5a18f091fc

View File

@@ -88,13 +88,14 @@ class CreatePermissionForm extends React.Component<Props, State> {
return false;
};
submit = () => {
submit = e => {
this.props.createPermission({
name: this.state.name,
type: this.state.type,
groupPermission: this.state.groupPermission
});
this.removeState();
e.preventDefault();
};
removeState = () => {