Hello!
I have got a ComboBox (Vaadin 16.0.0.beta2) and want to disable some items inside it.
Is there a way to do this?
In the RadioButtonGroup there is such a solution:
/**
* Sets the item enabled predicate for this radio button group. The
* predicate is applied to each item to determine whether the item should be
* enabled ({@code true}) or disabled ({@code false}). Disabled items are
* displayed as grayed out and the user cannot select them. The default
* predicate always returns true (all the items are enabled).
*
* @param itemEnabledProvider
* the item enable predicate, not {@code null}
*/
public void setItemEnabledProvider(
SerializablePredicate<T> itemEnabledProvider) {
this.itemEnabledProvider = Objects.requireNonNull(itemEnabledProvider);
refreshButtons();
}
Is there a way to do this at the ComboBox?
Thank you very much,
Thomas