formkit / docs-content

The content (.md format) — and only the content — for the FormKit documentation site.
17 stars 28 forks source link

FormKit does not fire change events: be more explicit about this #118

Open nielsbom opened 11 months ago

nielsbom commented 11 months ago

Finding out that FormKit components do not fire @change events is kind of important I think. Unfortunately it took me 45 minutes to find this out, others may be as surprised.

Others are also confused:

(and probably others)

I think the docs are not explicit enough about this: https://formkit.com/essentials/inputs#events

My suggestions are

  1. To be explicit in this and state that it's different from browser-native events.
  2. Link to an explanation of why FormKit chose this so interested people can understand the why.
  3. Provide a simple example of how to achieve this in FormKit (using FormKit best practices).
justin-schroeder commented 9 months ago

Well just to be clear @nielsbom, formkit fires any/all native events just like the browser. If you use @change on an input that supports the change event it will work just fine. There is no @change event for multiple checkbox inputs.

My main concern with listing all the parts of native HTML that also apply or do not apply to FormKit is that the HTML spec is very big, and I’m not entirely sure that FormKit should be the place where people learn about these standards. Perhaps we could be more explicit about how FormKit passes all event bindings through to the underlying input and then point people to MDN to read up on what event do exist in native HTML.