I have this code where I populate a ComboBox and try to set the value:
authenticatedUser.get().ifPresent(owner->{
deviceService.findAllByOwner(owner, true)
.collectList()
.subscribe(devices->{
System.out.println(devices);
ui.access(()->{
deviceComboBox.setItems(devices);
if(!devices.isEmpty()) {
System.out.println("Set VALUE");
System.out.println(devices.get(0));
deviceComboBox.setValue(devices.get(0));
System.out.println(deviceComboBox.getValue());
}
});
});
});
The printout always work where the getValue prints the actuall set item, but the value in the ComboBox is set to null 50%-ish of the time, I check this with a button, also the ComboBox don’t display anything. I have no other places in my code where the setValue is used (belive me, I have searched…)
If I changed the component to a Select the setValue is consistently set.
I am on Vaadin 24.4.11. Is there a know issue on the ComboBox or is it something I don’t understand?