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

[switch] registration failing #1317

Closed
tlouisse opened this issue Apr 7, 2021 · 3 comments
Closed

[switch] registration failing #1317

tlouisse opened this issue Apr 7, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@tlouisse
Copy link
Member

tlouisse commented Apr 7, 2021

Expected behavior

lion-switch should end up in .formElements after registration
See #1316

@tlouisse tlouisse changed the title [lion-switch] registration failing [switch] registration failing Apr 7, 2021
@tlouisse tlouisse added the bug Something isn't working label Apr 7, 2021
@daKmoR
Copy link
Collaborator

daKmoR commented Apr 7, 2021

huh I thought a switch is not supposed to be part of a form?

we have this on our docs page

Switch is not a Checkbox in disguise and should not be used as part of a form.

is that no longer true? 🤔

@tlouisse
Copy link
Member Author

tlouisse commented Apr 7, 2021

I think that's more a usage recommendation, because it's usually used in setting pages etc. that are not submitted to a backend via a form.
But I think more (probably most) controls can be used outside a form (listbox, select etc.).

I think a switch is a control (see openui/open-ui#81) that is usually placed outside (but should not be disallowed to be used within) a form.

Since it extends LionField/FormControl it gets all the interaction behaviors as described in the link and is thus compatible with the form.

@tlouisse
Copy link
Member Author

tlouisse commented Apr 8, 2021

This was a false alarm, everything works fine... Forgot to import the wc definition :)

@tlouisse tlouisse closed this as completed Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants