-
Notifications
You must be signed in to change notification settings - Fork 193
Open
Description
Description of the bug
With a two-way binding to an element property, a no-op write callback is supposed to reset the property value back to the original value that is still the signal value. That's also what happens from the server's point of view but the change is never propagated to the client. This is probably because the communication logic doesn't know that the property value has changed and thus treats the value "reset" as a no-op.
Expected behavior
Expected that the property value is restored also in the browser.
Minimal reproducible example
ValueSignal<String> signal = new ValueSignal<>("Value");
Element input = new Element("input");
input.bindProperty("value", signal, value -> {
System.out.println("Ignoring value change to " + value);
});
input.addPropertyChangeListener("value", "input", event -> {
System.out.println("Property change to " + event.getValue());
});
getElement().appendChild(input);
add(new Button("Change signal value", click -> signal.set("Changed")));
add(new Span(signal));- Edit the value in the field
- Observe that the write callback is invoked with the new value, but the value in the browser isn't restored to
Value - Click the button to observe that changes through the signal are still properly propagated to the client
Versions
- Vaadin / Flow version: 25.1.0-rc2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels