submitOnEnter={false} does not work, form submits anyway.
What you were expecting:
Form not to submit.
What happened instead:
Form submits - acts like html form with method="get" - copies form parameter to url query for some reason.
Steps to reproduce:
create very standard component as in related code below
Related code:
export const UserEdit = (props) => (
<Edit {...props}>
<SimpleForm submitOnEnter={false}>
<TextInput source="userName"/>
</SimpleForm>
</Edit>
);
Other information:
Environment
I managed to reproduce it for some forms but not all. See https://codesandbox.io/s/73l4oqv1l6
PostCreate which uses SimpleForm shows the problem. You can submit with enter when submitOnEnter is false.
PostEdit which uses TabbedForm does not show the problem.
CommentCreate which uses SimpleForm does not show the problem.
CommentEdit which uses SimpleForm does not show the problem.
@djhi does #2032 fix that?
Nope
Fixed by #2064
It is not fixed by #2064, since the PR is not merged. I have the same issue in my SimpleForm and used the action="javascript: void(0)" hack to avoid this behavior. Please reopen the issue.
Most helpful comment
It is not fixed by #2064, since the PR is not merged. I have the same issue in my SimpleForm and used the
action="javascript: void(0)"hack to avoid this behavior. Please reopen the issue.