-
Notifications
You must be signed in to change notification settings - Fork 66
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
TreeGrid hierarchy column wraps children horizontally #2429
Comments
A workaround is to use the following CSS (a global CSS, no need to inject it into the TreeGrid or Grid): vaadin-grid-tree-toggle {
width: 100%;
}
vaadin-grid-tree-toggle > flow-component-renderer {
width: calc(100% - 1.5em);
} |
Changed the title to better reflect what's going on here: |
Looks like fixing this in the web component would require us to align
<div part="content">
<slot></slot>
</div>
[part='content'] {
overflow: hidden;
text-overflow: ellipsis;
}
:host {
max-width: 100%;
} The main reason behind adding new stylable part is the fact that we need an extra HTML element to apply styles. UPD: the last point can be done separately as a bugfix. Then it would be easier to make this work with Flow. |
If we're going to mess with the DOM, would it make sense to do #1091 at the same time? |
Instead of adding a new element, we can also style the slot element. Not sure if that helps? |
Not really, since the slot is |
We actually can set UPD: here is a PR vaadin/web-components#3525 |
Yeah, this is what I meant. I think it’s a completely valid approach, if you can't think of reasons why it wouldn't work. I mean, that could also be considered as “messing with the DOM”? |
Description
Hierarchy column lays out its children in a different way than a non-hierarchy column: hierarchy column wraps its children while non-hierarchy column fills its parent. This produces an inconsistency of behavior for components that rely on width-filling the column, for example a Div which ellipsizes its text.
Expected outcome
Hierarchy column should make its child fill-parent, exactly as a regular column does.
Actual outcome
Hierarchy column leaves the child to grow, overflowing the column contents.
Live Demo (optional)
Minimal reproducible example
Steps to reproduce
Paste the class above to the skeleton-starter-flow project.
Environment
The text was updated successfully, but these errors were encountered: