Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ActionList: Prevent double key event when <button> is used #4772

Merged
merged 4 commits into from
Jul 25, 2024

Conversation

TylerJDev
Copy link
Contributor

@TylerJDev TylerJDev commented Jul 24, 2024

Prevents a keyboard event from being triggered twice if ActionList.Item is utilizing a button. This is because we don't need to attach a keyboard event to the button as the click event will work for both cases. This is only necessary when onSelect is used.

Changelog

Changed

  • Added conditional so that a keypress handler isn't attached to ActionList.Item when rendered with a button

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

Copy link

changeset-bot bot commented Jul 24, 2024

🦋 Changeset detected

Latest commit: fde3af7

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 Patch

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

Copy link
Contributor

github-actions bot commented Jul 24, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 94.75 KB (-0.13% 🔽)
packages/react/dist/browser.umd.js 95.07 KB (-0.05% 🔽)

@github-actions github-actions bot temporarily deployed to storybook-preview-4772 July 24, 2024 22:20 Inactive
@TylerJDev TylerJDev marked this pull request as ready for review July 25, 2024 13:15
@TylerJDev TylerJDev requested a review from a team as a code owner July 25, 2024 13:15
@TylerJDev TylerJDev requested a review from mperrotti July 25, 2024 13:15
@github-actions github-actions bot temporarily deployed to storybook-preview-4772 July 25, 2024 13:19 Inactive
@TylerJDev TylerJDev added this pull request to the merge queue Jul 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 25, 2024
@TylerJDev TylerJDev added this pull request to the merge queue Jul 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 25, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants