-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(@rjsf-antd): Submit button type bug (#2867) #2869
fix(@rjsf-antd): Submit button type bug (#2867) #2869
Conversation
@sarpere Please revert all of the |
…ct-jsonschema-form into rjsf-antd-submit-bug
…ct-jsonschema-form into rjsf-antd-submit-bug
…ct-jsonschema-form into rjsf-antd-submit-bug
This reverts commit afdd34c.
@@ -5,7 +5,7 @@ const { getSubmitButtonOptions } = utils; | |||
export default ({ uiSchema }) => { | |||
const { submitText, norender, props: submitButtonProps }= getSubmitButtonOptions(uiSchema); | |||
if (norender) {return null;} | |||
return (<Button type="submit" {...submitButtonProps}> | |||
return (<Button htmlType={"submit"} {...submitButtonProps}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider simplifying this to htmlType="submit"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I have done this.
I have updated the repo. |
@@ -5,7 +5,7 @@ const { getSubmitButtonOptions } = utils; | |||
export default ({ uiSchema }) => { | |||
const { submitText, norender, props: submitButtonProps }= getSubmitButtonOptions(uiSchema); | |||
if (norender) {return null;} | |||
return (<Button type="submit" {...submitButtonProps}> | |||
return (<Button htmlType="submit" {...submitButtonProps}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor little thing... there seems to be an extra space between Button
and htmlType
that you are welcome to remove even though it was there before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's all done. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It look like you are going to have to update the test snapshots as a result of this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated snapshots. You can try to trigger workflow. I'm not getting test run bug.
Reasons for making this change
Ant design theme assigned with wrong props. This is causing the form to fail to submit.
I have updated submit button prop;
from type to HtmlType.
fixes #2867