ink-ui icon indicating copy to clipboard operation
ink-ui copied to clipboard

Allow to unset the `defaultChoice` for confirm-input

Open LitoMore opened this issue 2 years ago • 2 comments

This allows user to unset the defaultChoice.

Nothing will happen when the user simply presses enter with defaultChoice="unset".

BTW, do you think changing this option name to none is better?

LitoMore avatar Jun 03 '23 18:06 LitoMore

Not sure we need this, as most confirm prompts I've seen always suggest a default choice. If you want user to explicitly type y or n and not accept enter as confirmation, you can disable submitOnEnter.

vadimdemedes avatar Jun 04 '23 06:06 vadimdemedes

The SSH shows a (yes/no) and only accepts an exact string yes or no.

LitoMore avatar Jun 04 '23 07:06 LitoMore