-
Notifications
You must be signed in to change notification settings - Fork 5
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
Dropdown menu clipped inside of grid cell #3
Comments
Blocked by #5 |
I've done some testing and it seems this issue happens because Grid's cell has a @CssImport(value = "./styles/vaadin-grid-cell-with-overflow.css", themeFor = "vaadin-grid")
public class MainView extends VerticalLayout {
public MainView() {
ChipField<String> chf = new ChipField<>("Select", "Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune");
chf.setClosable(true);
add(new Span("(Type UR for: Mercury, Saturn, Uranus)"));
Grid<List<String>> grid = new Grid<>();
Column chipColumn = grid.addColumn(list -> list.isEmpty() ? "Click me!" : list.stream().collect(Collectors.joining(", "))).setEditorComponent(chf);
chipColumn.setClassNameGenerator(c -> "overflow-visible-on-edit");
grid.getEditor().setBinder(new Binder<>());
grid.addItemClickListener(ev -> {
grid.getEditor().editItem(ev.getItem());
});
grid.setItems(Arrays.asList(new ArrayList<>()));
add(grid);
}
} and the syle file will need to contain something like: :host [part~="cell"].overflow-visible-on-edit ::slotted(vaadin-grid-cell-content) {
overflow: visible;
} |
That workaround would be even better if vaadin/web-components#750 were implemented. (Otherwise, the cell overflows even when it's not in edition mode.) I think this may be an issue with the client-side component, since it renders the dropdown inside of the shadow root. I would keep this issue open for further consideration. |
From thread in Vaadin Directory, Julien Nicoulaud wrote:
I can't find a way to use this component inside a grid cell, the dropdown menu always gets clipped at the cell boundary even if I use a global CSS rule
* {overflow: visible;}.
The text was updated successfully, but these errors were encountered: