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

[BUG] Delete/backspace button brings user back to root menu #109

Open
heymartinadams opened this issue Jan 24, 2024 · 1 comment
Open

[BUG] Delete/backspace button brings user back to root menu #109

heymartinadams opened this issue Jan 24, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@heymartinadams
Copy link

Describe the bug
When the user is at a menu with index n with n > 2, the expectation is that clicking the delete or backspace key gets the user to the immediately preceding menu, so n - 1. Instead, the root menu n === 1 is called.

To Reproduce
Steps to reproduce the behavior:

  1. Create 3 or more menus, e.g.
  <CommandMenu commands={menuMain} index={1} placeholder='Type a command or search...' />
  <CommandMenu commands={menuTask} index={2} placeholder='Describe your task' />
  <CommandMenu commands={menuFilter} index={3} placeholder='Filter...' />
  1. Navigate to the third menu, with the placeholder “Filter...”
  2. Press the delete button.
  3. You get taken back to the main menu with the placeholder “Type a command or search...”.

Expected behavior
User should be taken back to the immediately preceding menu. In the example above, the menu with the placeholder “Describe your task”.

Desktop (please complete the following information):

@heymartinadams heymartinadams added the bug Something isn't working label Jan 24, 2024
@haaarshsingh
Copy link
Owner

hey @heymartinadams, thanks for bringing this to my attention, i'll get on it asap.

@haaarshsingh haaarshsingh self-assigned this Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants