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

Label can be an attribute as well #168

Closed
Hendrikto opened this issue Mar 22, 2024 · 2 comments · Fixed by #175
Closed

Label can be an attribute as well #168

Hendrikto opened this issue Mar 22, 2024 · 2 comments · Fixed by #175

Comments

@Hendrikto
Copy link

In addition to the label element, there is also the label attribute (e.g. on the option element).

Gomponents currently only supports the element, not the attribute. I think this should be changed.

It could be handled the same way data, form, style, and title are, by splitting it into LabelEl and LabelAttr. The only problem I see is that this would break existing code.

What do you think, Markus?

@markuswustenberg
Copy link
Member

Hi @Hendrikto, thank you for the issue!

D'oh, I thought I had found them all. Damn. The label element is used extensively in a lot of code, I'll have to think about how to handle this one. Maybe there's a go fix type thing that could be used to fix it automatically in people's code. Hmm.

If you need it in the meantime, you can always use g.Attr("label").

@markuswustenberg
Copy link
Member

See also #170 .

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

Successfully merging a pull request may close this issue.

2 participants