Components
← All components

Auto-Submit Form

stimeo--auto-submit

Debounces input/change and submits the form via Turbo — no submit button.

  • Rails / Turbo

The stimeo--auto-submit controller submits its form a configurable delay after input or change, so Rails search/filter forms refresh through Turbo without a submit button. It owns only triggering the submit (debounce + requestSubmit), leaving the submission itself and validation to Turbo / the server. Rapid keystrokes coalesce into one request; the `on` value is an allowlist so a wired event type can be ignored via config. It never moves focus (WCAG 2.2 3.2.2 / 4.1.3), so auto-submitting cannot yank the caret out of the field. It marks the debounce window with data-auto-submit-pending and the in-flight window with aria-busy, dispatches stimeo--auto-submit:submit and :done, and can bridge the silent result swap to the shared stimeo--announcer when announce + message are set. The debounce timer and turbo:submit-end listener are torn down on disconnect (Turbo included). Behavior only — styling is owned by this Playground.

running
  • Rails
  • Stimulus
  • Turbo
  • Hotwire
  • Importmap
  • Propshaft
  • Sidekiq
  • Kamal