How to return to 'main menu' after multi-level SelectionPrompt #1007
-
I'm trying to create a multi-level menu with Spectre.Console that returns to the 'main menu' after completion
When I go into Option 1, I get the 'sub menu'
I'm trying to get it to go back to the main menu if I select My code so far (feels quite clumsy with these nested switch statements)
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This has come up before in another issue. There isn't any built in support for this, and I think people have been looking for work arounds to get the selection prompt to kinda work. I think if I had the need I'd look at the source of the selection prompt as the basis of a new control designed specifically to do this rather than trying to get the selection prompt to do something it wasn't designed for. Lots more features could be baked in for a consistent API to be reused too |
Beta Was this translation helpful? Give feedback.
This has come up before in another issue. There isn't any built in support for this, and I think people have been looking for work arounds to get the selection prompt to kinda work.
I think if I had the need I'd look at the source of the selection prompt as the basis of a new control designed specifically to do this rather than trying to get the selection prompt to do something it wasn't designed for.
Lots more features could be baked in for a consistent API to be reused too