Skip to content

Conversation

@dwsosa
Copy link
Contributor

@dwsosa dwsosa commented Mar 29, 2025

Closes #5823

Added a variable to the switch button interface and added a default value of "button" so that the toggleswitch component doesnt default to "submit" which is an issue when the toggleswitch is added to a form

Changelog

New

Changed

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

Jest test result to confirm the type attribute has value "button"
testsuite

@dwsosa dwsosa requested a review from a team as a code owner March 29, 2025 04:42
@dwsosa dwsosa requested a review from jonrohan March 29, 2025 04:42
@changeset-bot
Copy link

changeset-bot bot commented Mar 29, 2025

🦋 Changeset detected

Latest commit: 54b392d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dwsosa
Copy link
Contributor Author

dwsosa commented Mar 29, 2025

This PR implements the change for the ToggleSwitch default behavior to act as a button rather than a submit button. I haven't added the full test suite yet, and I'm looking for guidance on what tests would be most valuable for this change. I'm eager to iterate based on your feedback.

dwsosa and others added 5 commits March 29, 2025 17:17
@jonrohan jonrohan added this pull request to the merge queue Apr 22, 2025
Merged via the queue into primer:main with commit fe429d7 Apr 22, 2025
41 of 42 checks passed
@primer primer bot mentioned this pull request Apr 22, 2025
hectahertz pushed a commit that referenced this pull request May 20, 2025
…luded in form (#5841)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jon Rohan <yes@jonrohan.codes>
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.

ToggleSwitch button type="submit"

2 participants