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
{{ message }}
Repository navigation
Resetting DateTimePicker's overlayClassName does not work #6274
I added a DateTimePicker to a view and set DateTimePicker component's overlayClassName.
Trying to reset overlayClassName property breaks the component:
Seems to me as web component's input component is not generated. There are errors in browser console:
same with DatePicker
Expected outcome
After resetting reset overlayClassName property DateTimePicker is displayed as before setting overlayClassName at all.
Minimal reproducible example
@Route
public class MainView extends VerticalLayout {
public MainView() {
DateTimePicker dateTimePicker = new DateTimePicker("Default");
DateTimePicker dateTimePicker2 = new DateTimePicker("Reset with setOverlayClassName(null)");
dateTimePicker2.setOverlayClassName("example");
dateTimePicker2.setOverlayClassName(null);
DateTimePicker dateTimePicker3 = new DateTimePicker("Reset with setOverlayClassName(\"\")");
dateTimePicker3.setOverlayClassName("example");
dateTimePicker3.setOverlayClassName("");
DateTimePicker dateTimePicker4 = new DateTimePicker("Reset with getElement().setProperty(\"overlayClass\", null)");
dateTimePicker4.setOverlayClassName("example");
dateTimePicker4.getElement().setProperty("overlayClass", null);
add(dateTimePicker);
add(dateTimePicker2);
add(dateTimePicker3);
add(dateTimePicker4);
}
}
Steps to reproduce
Create new Vaadin app (Used maven archetype)
Edit "MainView" as in "Minimal reproducible example"
Activity
web-padawan commentedon May 6, 2024
Thanks for the issue. Confirmed it using the web component. I'll add a check to ensure empty
overlayClassdoesn't throw.