-
Notifications
You must be signed in to change notification settings - Fork 193
Open
Description
Description of the bug
When using the experimental Tailwind integration, the browser is immediately reloaded when making a change to the Java code. This leads to needless flickering and does also discard state such as scroll positions and signal values that are preserved by the regular hotswap logic.
Expected behavior
State should be preserved also when using Tailwind
Minimal reproducible example
@Route
public class MainView extends VerticalLayout {
ValueSignal<Boolean> signal = new ValueSignal<>(false);
public MainView() {
var toggle = new Checkbox("State");
toggle.bindValue(signal, signal::set);
toggle.addClassName("bg-green-500");
add(toggle);
}
}- Get a Vaadin 25.1 project without example view from start.vaadin.com
- Add the example view and run the application with hotswap enabled
- Check the checkbox
- Change the checkbox label in the code and observe that the change is hotswapped without a page reload and the checkbox remains checked
- Enable the Tailwind feature flag (
com.vaadin.experimental.tailwindCss) - Restart the server
- Repeat steps 3 & 4, observing that the page is reloaded in the browser and the checkbox doesn't remain checked
Versions
- Vaadin / Flow version: 25.1.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels