Skip to content

Commit 42adff8

Browse files
authored
fix: add missing guide line in autocomplete-multiselect (#430)
1 parent 8e2e30a commit 42adff8

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.changeset/silent-news-share.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@clack/prompts": patch
3+
---
4+
5+
fix: add missing guide line in autocomplete-multiselect

packages/prompts/src/autocomplete.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ export const autocompleteMultiselect = <Value>(opts: AutocompleteMultiSelectOpti
304304

305305
// Calculate header and footer line counts for rowPadding
306306
const headerLines = [
307-
...title.split('\n'),
307+
...`${title}${barColor(S_BAR)}`.split('\n'),
308308
`${barColor(S_BAR)} ${color.dim('Search:')} ${searchText}${matches}`,
309309
...noResults,
310310
...errorMessage,

packages/prompts/test/__snapshots__/autocomplete.test.ts.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ exports[`autocompleteMultiselect > can be aborted by a signal 1`] = `
340340
"<cursor.hide>",
341341
"│
342342
◆ foo
343-
343+
[36m│[39m
344344
│ Search: _
345345
│ ◻ Apple
346346
│ ◻ Banana
@@ -360,7 +360,7 @@ exports[`autocompleteMultiselect > can use navigation keys to select options 1`]
360360
"<cursor.hide>",
361361
"│
362362
◆ Select fruits
363-
363+
[36m│[39m
364364
│ Search: _
365365
│ ◻ Apple
366366
│ ◻ Banana
@@ -415,7 +415,7 @@ exports[`autocompleteMultiselect > renders error when empty selection & required
415415
"<cursor.hide>",
416416
"│
417417
◆ Select a fruit
418-
418+
[36m│[39m
419419
│ Search: _
420420
│ ◻ Apple
421421
│ ◻ Banana
@@ -428,7 +428,7 @@ exports[`autocompleteMultiselect > renders error when empty selection & required
428428
"<cursor.down count=1>",
429429
"<erase.down>",
430430
"▲ Select a fruit
431-
431+
[33m│[39m
432432
│ Search: _
433433
│ Please select at least one item
434434
│ ◻ Apple
@@ -442,7 +442,7 @@ exports[`autocompleteMultiselect > renders error when empty selection & required
442442
"<cursor.down count=1>",
443443
"<erase.down>",
444444
"◆ Select a fruit
445-
445+
[36m│[39m
446446
│ Search: _
447447
│ ◼ Apple
448448
│ ◻ Banana

0 commit comments

Comments
 (0)