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

Table components should extend HtmlComponent, if suitable #5

Closed
brunovianarezende opened this issue Aug 26, 2022 · 3 comments
Closed
Labels
enhancement New feature or request

Comments

@brunovianarezende
Copy link

It seems to me the TableBody component should extend the com.vaadin.flow.component.HtmlContainer class, since it contains other components. Or, at least the com.vaadin.flow.component.HtmlComponent class. This would allow one to do things like add css classes to them.

@stefanuebe stefanuebe added the enhancement New feature or request label Sep 27, 2022
@stefanuebe
Copy link
Owner

I think extending HtmlComponent might make sense here as it is already for other parts the case. HtmlContainer is not possible as it would allow "injecting" non conform elements into the table body (which only may contain table rows by spec).

I also extend this issue to check other part, if they also should / could extend HtmlComponent.

@stefanuebe stefanuebe changed the title TableBody should extend HtmlContainer Table components should extend HtmlComponent, if suitable Sep 27, 2022
@brunovianarezende
Copy link
Author

In vaadin 24 all components inherit from HasStyles (vaadin/flow#15742), so it is one reason less to change TBody and other components.

@stefanuebe
Copy link
Owner

Yep. Due to this I would for now close this issue as I do not really see reason to extend HTMLComponent. The only things it also adds are the title attribute and the HasSize interface, from which the tbody element only supports the height setting (widths, min-/max-height are not).

If there are other reasons, that I am not aware of to still extend this class, please reopen and give some feedback.

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

No branches or pull requests

2 participants