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
If I initialize the combobox with setEnabled(false), when trying to switch to setEnabled(true), the dropdown is not displaying. Here's an example to reproduce the issue:
Button toggleButton = new Button("Toggle combobox status");
MultiselectComboBox<User> combobox = new MultiselectComboBox<User>("Combo");
toggleButton.addClickListener(e -> {
combobox.setEnabled(!combobox.isEnabled());
});
combobox.setEnabled(false);
combobox.setItems(List.of(new User("1", "Jane"), new User("2", "John")));
combobox.setItemLabelGenerator(User::getName);
add(toggleButton, combobox);
I have an Solution that works for me. The trick is that the webcomponent calls Client Callable when it is Ready.
First i set the enabled state to true. This is needed that the Component renders correct. Wehn the Component is ready in Dom i set the Enabeld state.
`public class MultiselectComboBoxExt extends MultiselectComboBox implements HasLabel {
If I initialize the combobox with setEnabled(false), when trying to switch to setEnabled(true), the dropdown is not displaying. Here's an example to reproduce the issue:
Vaadin version: 23.0.1
Component version: 4.0.0-rc2
The text was updated successfully, but these errors were encountered: