Skip to content

Search fires on partial queries via phx-change before user finishes typing #12

@NikolaRHristov

Description

@NikolaRHristov

Description

The search input has phx-debounce="300" combined with phx-change="search_changed", which fires run_search/2 on every 300ms pause while typing. A 300ms pause mid-sentence is very natural, causing searches to fire on partial queries like "how w" before the user has finished typing.

Steps to Reproduce

  1. Open the search page
  2. Start typing a multi-word query, pausing briefly (>300ms) mid-sentence
  3. Observe that a search fires for the partial query before the full query is entered

Expected Behaviour

Increase phx-debounce from "300" to "600" on the search input so the user has enough time to finish typing before a search is triggered.

Current Behaviour

Search fires for partial queries on a 300ms pause, resulting in premature results before the user finishes their query.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions