Skip to content

[Bug] autocomplete: user input not displayed while typing #440

@esau-morais

Description

@esau-morais

Description

When using autocomplete from @clack/prompts@1.0.0-alpha.9, the user's typed input is not displayed in the search field. The placeholder text remains visible even while typing, though filtering works correctly.

Expected: Search input shows typed characters (e.g., Search: dra█)
Actual: Placeholder stays visible (e.g., Search: Type to filter... (27 matches))

Reproduction

import { autocomplete } from "@clack/prompts";

const result = await autocomplete({
  message: "Pick a theme",
  options: [
    { value: "dracula", label: "dracula" },
    { value: "nord", label: "nord" },
    { value: "tokyo-night", label: "tokyo-night" },
  ],
  placeholder: "Type to filter...",
});
  1. Run the above code
  2. Start typing (e.g., "dra")
  3. Notice filtering works (list narrows down) but input text is not visible

Environment

  • @clack/prompts: 1.0.0-alpha.9
  • @clack/core: 1.0.0-alpha.9
  • Runtime: Bun 1.3.5
  • OS: Linux

Workaround

Using stable @clack/prompts@0.11.0 with select instead of autocomplete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions