You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I add two buttons to a context menu, both with a theme variant of LUMO_ERROR, then this is not shown at all;
however, if I wrap one button into a FlexLayout, it works.
I would like to make do without such a work-around.
Expected outcome
Theme variant is honoured, even without a button being wrapped in a FlexLayout.
Actual outcome
Unwrapped button does not show the LUMO_ERROR theme variant.
Live Demo (optional)
Minimal reproducible example
public AboutView() {
setSpacing(false);
Image img = new Image("images/empty-plant.png", "placeholder plant");
img.setWidth("200px");
add(img);
add(new H2("This place intentionally left empty"));
add(new Paragraph("It’s a place where you can grow your own UI 🤗"));
setSizeFull();
setJustifyContentMode(JustifyContentMode.CENTER);
setDefaultHorizontalComponentAlignment(Alignment.CENTER);
getStyle().set("text-align", "center");
**ContextMenu contextMenu = new ContextMenu(img);
Button button1 = new Button("Eins");
button1.addThemeVariants(ButtonVariant.LUMO_ERROR);
Button button2 = new Button("Zwei");
button2.addThemeVariants(ButtonVariant.LUMO_ERROR);
FlexLayout flexLayout = new FlexLayout(button2);
contextMenu.add(button1, flexLayout);**
}
-->
Steps to reproduce
See Vaadin Starter demo project, use above code.
Environment
Version of the component / Vaadin platform.
Vaadin 22.0.2
OS.
macOS, latest of 20220110
Browsers Affected
Chrome, probably all
The text was updated successfully, but these errors were encountered:
yuriy-fix
changed the title
ContextMenu added component's theme variant is honoured
ContextMenu added component's theme variant is not honoured
Jan 11, 2022
Description
If I add two buttons to a context menu, both with a theme variant of LUMO_ERROR, then this is not shown at all;
however, if I wrap one button into a FlexLayout, it works.
I would like to make do without such a work-around.
Expected outcome
Theme variant is honoured, even without a button being wrapped in a FlexLayout.
Actual outcome
Unwrapped button does not show the LUMO_ERROR theme variant.
Live Demo (optional)
Minimal reproducible example
-->
Steps to reproduce
See Vaadin Starter demo project, use above code.
Environment
Vaadin 22.0.2
macOS, latest of 20220110
Browsers Affected
Chrome, probably all
The text was updated successfully, but these errors were encountered: