Pass list of initially toggled options for multi-select menus
See original GitHub issueHey!
I’m looking for something like this:
options = ["apple", "banana", "orange"]
menu = TerminalMenu(options, multi_select=True, selected_options=set([0]))
menu.show()
… which would show:
> [*] apple
[ ] banana
[ ] orange
Is it possible to provide a multi-select menu with a list of options that are already set to True?
Thanks for maintaining this amazing project! Any feedback is appreciated!
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
How to get all selected values of a multiple select box?
In the case of <select multiple="multiple"> elements, the .val() method returns an array containing each selected option;.
Read more >Drop-Down Menu or list box for multiple selection - Plus2net
HTML form dropdown list with name size and multiple options with code in webpage.
Read more >How to Create a Custom Multi-Select (OR Single) Menu
In today's video we'll be creating a custom multi - select (or single-select) menu using HTML, CSS & JavaScript. This is very easy...
Read more >Bootstrap Multiselect Examples - CodeHim
When using the plugin for single selections (without the multiple attribute present), the first option will automatically be selected if no other option...
Read more >Cannot display multi static select menu with initial options from ...
I'm trying to load a multi static select menu with some pre-loaded initial options. I'm able to successful display the menu with the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can pass the initial cursor index with the
cursor_index
constructor parameter.Hey @kelvindecosta, definitely a useful feature request and should not be so much work to implement. I will look into this when I have some free time!