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
Currently it is not simply possible to add/remove a collection of components to/from another component. It first has to be converted to an array. That feels clumsy and incomplete.
Describe the solution you'd like
Provide new, collection based add and remove methods to HasComponents which do the same as the varargs variants, e.g.
public interface HasComponents extends HasElement, HasEnabled {
default void add(Collection<Component> components) {
Objects.requireNonNull(components, "Components should not be null");
for (Component component : components) {
Objects.requireNonNull(component,
"Component to add cannot be null");
getElement().appendChild(component.getElement());
}
}
// analog for remove(Collection<Component> components)
}
The text was updated successfully, but these errors were encountered:
Describe your motivation
Currently it is not simply possible to add/remove a collection of components to/from another component. It first has to be converted to an array. That feels clumsy and incomplete.
Describe the solution you'd like
Provide new, collection based add and remove methods to
HasComponents
which do the same as the varargs variants, e.g.The text was updated successfully, but these errors were encountered: