inquirer-rs icon indicating copy to clipboard operation
inquirer-rs copied to clipboard

Support checkbox

Open Munksgaard opened this issue 9 years ago • 2 comments

This is a tracking/discussion issue for supporting a checkbox style prompt. Such a prompt would allow the user to select more than one items from a list. The inspiration is the checkbox function from the Inquirer.js library:

Image of checkbox style menu

This issue is for discussing such a feature and how to implement it.

Munksgaard avatar Jul 16 '16 10:07 Munksgaard

After reviewing the checkbox function from Inquirer.js, I think it feels overengineered.

  • It functions as a sort of looping list, where you can scroll up and down infinitely.
  • There is support for "headlines", disabled list items which just serve to categorize the items

To keep things simple, I think we should get rid of those two, and keep our library relatively simple.

However, I'm curious if anyone else thinks differently? Is there a need for categorization? Would you often have a list of 10+ choices (which might justify the loopy scrolling behavior)?

Munksgaard avatar Jul 16 '16 10:07 Munksgaard

I've started an implementation in #12.

Perhaps we need to support having some values enabled by default?

Munksgaard avatar Jul 16 '16 11:07 Munksgaard