Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nielsbom opened this issue Oct 25, 2023 · 1 comment
Open

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

nielsbom opened this issue Oct 25, 2023 · 1 comment

Comments

@nielsbom
Copy link

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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants