react-cmdk icon indicating copy to clipboard operation
react-cmdk copied to clipboard

Navigation to previous commands.

Open lucky-chap opened this issue 3 years ago • 5 comments

Whenever a user navigates to a command with sub-commands, there's nothing to tell the user to press the Escape key to go back. I think showing some sort of help message can make the user navigate back from deep sub-commands, without trying to figure out which key to press. This is a huge problem on mobile phones

lucky-chap avatar Jun 15 '22 16:06 lucky-chap

Hi Quavo, I understand your problem and I will try to think of a good solution. For now though, maybe you can just render a back option, like this? image

albingroen avatar Jun 16 '22 06:06 albingroen

@albingroen Could you utilize delete or backspace, as raycast does?

They also include a "back" button:

Raycast back button

dragonfire1119 avatar Jun 24 '22 07:06 dragonfire1119

You can also use the footer property on the root component to show something like this.

image

albingroen avatar Jun 25 '22 17:06 albingroen

Just found this lib and wanted to say the same: going up a level via backspace would be really useful to implement.

Semmu avatar Jun 26 '22 13:06 Semmu

This PR adds support for hitting Backspace to move up a page (runs the onEscape if specified) https://github.com/albingroen/react-cmdk/pull/8

albingroen avatar Jun 26 '22 15:06 albingroen