Skip to content

Commit 07ca32d

Browse files
authored
fix: revert placeholder-on-return change (#324)
1 parent 5de191f commit 07ca32d

File tree

4 files changed

+6
-4763
lines changed

4 files changed

+6
-4763
lines changed

.changeset/afraid-ladybugs-drive.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@clack/prompts": minor
3+
"@clack/core": minor
4+
---
5+
6+
Reverted a change where placeholders were being set as values on return.

packages/core/src/prompts/prompt.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,6 @@ export default class Prompt {
205205
}
206206

207207
if (key?.name === 'return') {
208-
if (!this.value && this.opts.placeholder) {
209-
this.rl?.write(this.opts.placeholder);
210-
this.emit('value', this.opts.placeholder);
211-
}
212-
213208
if (this.opts.validate) {
214209
const problem = this.opts.validate(this.value);
215210
if (problem) {

0 commit comments

Comments
 (0)