We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37304d8 commit a0e431aCopy full SHA for a0e431a
packages/prompts/src/index.ts
@@ -362,8 +362,10 @@ export const selectKey = <Value extends string>(opts: SelectOptions<Value>) => {
362
363
switch (this.state) {
364
case 'submit':
365
- value = opt(this.options.find((opt) => opt.value === this.value)!, 'selected');
366
- break;
+ return `${title}${color.gray(S.BAR)} ${opt(
+ this.options.find((opt) => opt.value === this.value)!,
367
+ 'selected'
368
+ )}`;
369
case 'cancel':
370
return `${title}${color.gray(S_BAR)} ${opt(this.options[0], 'cancelled')}\n${color.gray(
371
S_BAR
0 commit comments