BUG: Clicking the "X" clears the widget but no ValueChangeEvent is generated

I am using addValueChangeListener() to register a listener for when the field changes. This works properly (i.e., a ValueChangeEvent event is delivered) when a folder or a leaf node is chosen, but when the “X” is clicked to clear the field, no notification event is received. This causes the client and server to get out of sync. Instead, a ValueChangeEvent with e.getValue == null should be delivered.

This behavior is 100% consistent and easy to reproduce. Please fix!

I’m using Vaadin 24.5.5 and TreeComboBox version 3.3.0.

Note: The server is getting the new null value, it’s just not generating any ValueChangeEvent. So a workaround is to always explicitly ask the field for its current value via field.getValue(), instead of relying only on ValueChangeEvent’s to know the current value.