Skip to content
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

Merged
merged 9 commits into from
May 25, 2022

Conversation

sarpere
Copy link
Contributor

@sarpere sarpere commented May 23, 2022

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

@sarpere sarpere changed the title Submit button type bug fix fix(@rjsf-antd): Submit button type bug May 23, 2022
@sarpere sarpere changed the title fix(@rjsf-antd): Submit button type bug fix(@rjsf-antd): Submit button type bug #2867 May 23, 2022
@sarpere sarpere changed the title fix(@rjsf-antd): Submit button type bug #2867 fix(@rjsf-antd): Submit button type bug (#2867) May 23, 2022
@heath-freenome
Copy link
Member

@sarpere Please revert all of the package-lock.json changes as they are not necessary to fix the issue

@@ -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}>
Copy link
Member

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"

Copy link
Contributor Author

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.

@sarpere
Copy link
Contributor Author

sarpere commented May 23, 2022

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}>
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's all done. :)

Copy link
Member

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

Copy link
Contributor Author

@sarpere sarpere May 25, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot Submit Form // @rjsf/antd
2 participants