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

Loosen API for form inputs? #2369

Open
1 task done
adbehahn opened this issue Jun 20, 2022 · 1 comment
Open
1 task done

Loosen API for form inputs? #2369

adbehahn opened this issue Jun 20, 2022 · 1 comment

Comments

@adbehahn
Copy link

adbehahn commented Jun 20, 2022

Code of conduct

  • I agree to follow this project's code of conduct.

Description of issue

sp-checkbox doesn't expose a "name" attribute in its API:

            <input
                id="input"
                aria-labelledby="label"
                type="checkbox"
                .checked=${this.checked}
                @change=${this.handleChange}
            />

I was wondering if either 1) name could be added to the API or 2) all properties that aren't used exclusively by the wrapping component could be passed through to the input.

Same thought applies to all inputs wrapped by Spectrum.

As a coder, a goal would be to leverage built-in Javascript API's and therefore be able to write simpler and less risky code, such as:

const formData = new FormData(form);
@Westbrook
Copy link
Contributor

Notes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment