FieldElementProps

Props to spread onto a field element for integration with Qwik form handling.

Definition

  • FieldElementProps
    • name string
    • autofocus boolean
    • ref QRL<(element: FieldElement) => void>
    • onFocus$ QRL<() => void>
    • onInput$ QRL<(event: InputEvent, element: FieldElement) => void>
    • onChange$ QRL<(event: Event, element: FieldElement) => void>
    • onBlur$ QRL<() => void>

Explanation

onFocus$ marks the field as touched and runs the configured 'touch' validation, while onBlur$ runs the configured 'blur' validation. Neither handler uses the event object, so their wrapped callbacks are typed as () => void and can be passed to native elements or custom components with different focus event types.

Contributors

Thanks to all the contributors who helped make this page better!

  • GitHub profile picture of @fabian-hiller

Partners

Thanks to our partners who support the project ideally and financially.

Sponsors

Thanks to our GitHub sponsors who support the project financially.

  • GitHub profile picture of @vasilii-kovalev
  • GitHub profile picture of @UpwayShop
  • GitHub profile picture of @ruiaraujo012
  • GitHub profile picture of @hyunbinseo
  • GitHub profile picture of @nickytonline
  • GitHub profile picture of @kibertoad
  • GitHub profile picture of @caegdeveloper
  • GitHub profile picture of @Thanaen
  • GitHub profile picture of @bmoyroud
  • GitHub profile picture of @ysknsid25
  • GitHub profile picture of @dslatkin