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

search: Add keyboard navigation to results #167

Merged
merged 2 commits into from
May 27, 2024
Merged

search: Add keyboard navigation to results #167

merged 2 commits into from
May 27, 2024

Conversation

zsol
Copy link
Owner

@zsol zsol commented May 26, 2024

search: Add keyboard navigation to results

After searching for a string, the user can navigate results by pressing up/down arrows.

Stack created with Sapling. Best reviewed with ReviewStack.

Copy link
Collaborator

@anathien anathien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one! 🙂
Left some minor suggestions.

www/components/core/Search.tsx Outdated Show resolved Hide resolved
target?.focus();
event.preventDefault();
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about looping around on the results when one reaches the last element in the dropdown and presses Down?

After searching for a string, the user can navigate results by pressing up/down arrows.
@zsol zsol merged commit 1c4cae1 into main May 27, 2024
3 checks passed
@zsol zsol deleted the pr167 branch June 1, 2024 22:49
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.

Add keyboard shortcuts to search box
2 participants