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

Control ArrowUp and ArrowDown keys for Dropdown #18324

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cknabe
Copy link
Contributor

@cknabe cknabe commented Jan 11, 2025

Closes #18277

Disallows ArrowUp if the first item is selected.
Disallows ArrowDown if the last item is selected.
Allows all key-presses when the Dropdown is open
Allows all key-presses that are not ArrowUp or ArrowDown

Testing / Reviewing

  1. Load the Dropdown component in the storybook
  2. Press arrow up and select the first item
  3. Press arrow up and see Dropdown does not open
  4. Press arrow down and select the last item
  5. Press arrow down and see Dropdown does not open
  6. Press arrow up and select some item in the middle
  7. Press arrow down/up and see Dropdown opens

@cknabe cknabe requested a review from a team as a code owner January 11, 2025 05:28
@cknabe cknabe requested review from tay1orjones and emyarod January 11, 2025 05:28
Copy link

netlify bot commented Jan 11, 2025

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 6489e55
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/678201841e7c750008f13c87
😎 Deploy Preview https://deploy-preview-18324--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 11, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 6489e55
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/678201847a972600080b8cd0
😎 Deploy Preview https://deploy-preview-18324--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 11, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 6489e55
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/678201849e2e170008884b2d
😎 Deploy Preview https://deploy-preview-18324--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jan 11, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 84.17%. Comparing base (e973f28) to head (6489e55).

Files with missing lines Patch % Lines
...ackages/react/src/components/Dropdown/Dropdown.tsx 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18324      +/-   ##
==========================================
- Coverage   84.17%   84.17%   -0.01%     
==========================================
  Files         408      408              
  Lines       14435    14441       +6     
  Branches     4690     4696       +6     
==========================================
+ Hits        12150    12155       +5     
- Misses       2121     2122       +1     
  Partials      164      164              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

[Bug]: Dropdown shouldn't open with Up arrow key press
1 participant