Skip to content

Commit

Permalink
Allow explicitly setting action to empty string (jaredpalmer#2981)
Browse files Browse the repository at this point in the history
If someone actually wants to do a standard http post to the same page.
  • Loading branch information
KATT authored Jan 4, 2021
1 parent 5e65ab6 commit 7f27ae4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/formik/src/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const Form = React.forwardRef<HTMLFormElement, FormProps>(
// iOS needs an "action" attribute for nice input: https://stackoverflow.com/a/39485162/406725
// We default the action to "#" in case the preventDefault fails (just updates the URL hash)
const { action, ...rest } = props;
const _action = action || '#';
const _action = action ?? '#';
const { handleReset, handleSubmit } = useFormikContext();
return (
<form
Expand Down

0 comments on commit 7f27ae4

Please sign in to comment.