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

[sitecore-jss-react-forms] Follow up to form disable bugfix #1614

Merged
merged 4 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Our versioning strategy is as follows:
* `[templates/nextjs-sxa]` Don't let Image component wrap <img> with <a> tag when TargetUrl is not configured. ([#1593](https://github.com/Sitecore/jss/issues/1593))
* `[templates/nextjs]` Next config header plugin for CORS. ([#1597](https://github.com/Sitecore/jss/pull/1597))
* `[templates/nextjs]` Ensure dictionary data is only fetched when layout data is present for a route ([#1608](https://github.com/Sitecore/jss/pull/1608))
* `[sitecore-jss-react-forms]` Form should be blocked while submit is in progress to avoid submit spam ([#1611](https://github.com/Sitecore/jss/pull/1611))
* `[sitecore-jss-react-forms]` Form should be blocked while submit is in progress to avoid submit spam ([#1611](https://github.com/Sitecore/jss/pull/1611) [#1614](https://github.com/Sitecore/jss/pull/1614))
* `[templates/nextjs]` Fix linting errors, fix type error by upgrading @react/types to v18.2.22 ([#1613](https://github.com/Sitecore/jss/pull/1613))

### 🛠 Breaking Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ describe('<Form />', () => {

c.setState({ submitInProgress: true });

expect(c.find('form').prop('inert')).to.be.true;
expect(c.find('form').prop('inert')).to.be.equal('true');
});

it('should return form to non-inert state after submit is done', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/sitecore-jss-react-forms/src/components/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class Form extends Component<FormProps, FormState & FieldStateCollection>
action={action}
method="POST"
onSubmit={this.onSubmit.bind(this)}
{...{ inert: isInert || undefined }}
{...{ inert: isInert ? 'true' : undefined }}
>
<ErrorComponent form={form} formErrors={this.state.errors} fieldErrors={fieldErrors} />
{fieldComponents}
Expand Down