Skip to content

Commit

Permalink
fix(button): Include name and value properties on temporary submit bu…
Browse files Browse the repository at this point in the history
…tton (#2351)

The name and value used on the button element are not submitted as part of the form event as these are not cloned onto the temporary button used for submitting the form.
  • Loading branch information
marcrobertscamao authored Oct 16, 2024
1 parent f657202 commit e0ff157
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/components/src/components/button/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ export class Button {
if (this.type) {
fakeButton.type = this.type;
}
if (this.value) {
fakeButton.value = this.value;
}
if (this.name) {
fakeButton.name = this.name;
}
fakeButton.style.display = 'none';
parentForm.appendChild(fakeButton);
fakeButton.click();
Expand Down

0 comments on commit e0ff157

Please sign in to comment.