# `Soundcheck.Check.Refactor.ChangeWithoutDebounce`
[🔗](https://github.com/leonqadirie/soundcheck/blob/v0.1.0/lib/soundcheck/check/refactor/change_without_debounce.ex#L1)

## Basics

> #### This check is disabled by default. {: .neutral}
>
> [Learn how to enable it](`e:credo:config_file.html#checks`) via `.credo.exs`.

This check has a base priority of `low` and works with any version of Elixir.

## Explanation

Flags text-like inputs in a form with `phx-change` that set no
`phx-debounce`. Without it, every keystroke sends a change event to
the server and re-runs validation.

Before:

    <.form for={@form} phx-change="search">
      <.input field={@form[:q]} type="search" />
    </.form>

After:

    <.input field={@form[:q]} type="search" phx-debounce="300" />

Inputs count as text-like when their `type` is in `input_types`, or
when an `<.input>` component sets no type (it defaults to `text`).
`<textarea>` always counts. A `phx-debounce` or `phx-throttle` on the
input or on the form silences the check.

Confidence: medium. Tier: syntactic (works without compiling).

## Check-Specific Parameters

Use the following parameters to configure this check:

### `:excluded_paths`

  Paths to skip (atoms, binaries as path segments, or regexes).

*This parameter defaults to* `[~r/\/test\//, "test"]`.

### `:strict`

  Unused.

*This parameter defaults to* `false`.

### `:input_types`

  Input types that count as text-like.

*This parameter defaults to* `["text", "search", "email", "textarea", "url", "tel"]`.

## General Parameters

Like with all checks, [general params](`e:credo:check_params.html`) can be applied.

Parameters can be configured via the [`.credo.exs` config file](`e:credo:config_file.html`).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
