Skip to content

Commit 32a5d76

Browse files
committed
fix menu removeAll should work on a copy of the menu items list.
1 parent 698c982 commit 32a5d76

File tree

1 file changed

+1
-1
lines changed
  • domino-ui/src/main/java/org/dominokit/domino/ui/menu

1 file changed

+1
-1
lines changed

domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ public Menu<V> removeItemAt(int index) {
565565
* @return The current Menu instance.
566566
*/
567567
public Menu<V> removeAll() {
568-
menuItems.forEach(BaseDominoElement::remove);
568+
new ArrayList<>(menuItems).forEach(this::removeItem);
569569
menuItems.clear();
570570
closeCurrentOpen();
571571
currentOpen = null;

0 commit comments

Comments
 (0)