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

Option to disable focusing first menu item on click #279

Merged
merged 17 commits into from
Aug 13, 2021

Conversation

corymharper
Copy link
Contributor

@corymharper corymharper commented Aug 3, 2021

This pull request does two things. First, it changes the default behavior of the hook to focus the first menu item any time the menu is opened. Second, it introduces an option to disable that behavior, but only for clicks.

Screen.Recording.2021-08-03.at.2.23.09.PM.mp4

Closes #278

@codecov
Copy link

codecov bot commented Aug 3, 2021

Codecov Report

Merging #279 (acd63d9) into master (4385c5e) will decrease coverage by 1.98%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #279      +/-   ##
==========================================
- Coverage   92.70%   90.72%   -1.99%     
==========================================
  Files           1        1              
  Lines          96       97       +1     
  Branches       30       31       +1     
==========================================
- Hits           89       88       -1     
- Misses          7        9       +2     
Impacted Files Coverage Δ
src/use-dropdown-menu.ts 90.72% <100.00%> (-1.99%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4385c5e...acd63d9. Read the comment docs.

package.json Outdated Show resolved Hide resolved
website/docs/getting-started/using.md Outdated Show resolved Hide resolved
website/docs/design/options.md Outdated Show resolved Hide resolved
@WesCossick WesCossick changed the title Disable focus first option Option to disable focusing first menu item on click Aug 13, 2021
@WesCossick WesCossick merged commit 9401baa into master Aug 13, 2021
@WesCossick WesCossick deleted the disable-focus-first-option branch August 13, 2021 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add option to choose whether to focus first item on click
2 participants