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

feat(Checkbox): enable support for form-associated #1213

Merged
merged 3 commits into from
Aug 16, 2024
Merged

Conversation

dgonzalezr
Copy link
Collaborator

Description

This PR enables support for form-associated custom elements, allowing them to participate in HTML forms:

https://stenciljs.com/docs/forms#using-form-associated-custom-elements
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals

Currently, adding a <bq-checkbox> element to a form does not result in its participation in the form submission, even when a name and formId are provided. With this pull request, users need only to set the component's name attribute/property to link it to the form. Additionally, it enables validation of the element when 'required' is present, thus preventing form submission if the BqCheckbox is not selected or checked.

CleanShot.2024-08-15.at.20.28.32.mp4

Related Issue

Fixes #ISSUE_NUMBER

Documentation

Screenshots (if applicable)

Checklist

  • I have read the CONTRIBUTING document.
  • I have read the CODE OF CONDUCT document.
  • I have reviewed my own code.
  • I have tested the changes locally.
  • I have updated the documentation (if applicable).
  • I have added unit tests and e2e tests (if applicable).
  • I have requested reviews from relevant team members.

Additional Notes

@dgonzalezr dgonzalezr added this to the lavida.DGR.8312@% milestone Aug 15, 2024
Copy link

@dgonzalezr dgonzalezr merged commit b615cc7 into main Aug 16, 2024
6 checks passed
@dgonzalezr dgonzalezr deleted the feat/checkbox branch August 16, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🛠 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants