[14.1.17] GridContextMenu ClickListeners cannot work when add menu item in

Hello, I was just about to upgrade my project from 8 to lasted LTS version 14.
At start trying to add some context menus in my grid, I write this and the click listeners worked successfully.

       GridContextMenu<Tenant> menu = grid.addContextMenu();
       menu.addItem("a1111", e -> System.out.println("a1111"));		
       menu.addItem("a2222", e -> System.out.println("a2222"));		
       menu.addItem("a3333", e -> System.out.println("a3333"));		
       menu.addItem("a4444", e -> System.out.println("a4444"));

Then, because the menu status will be flow entity(one object item in grid) to changing. I write this

grid.addContextMenu().addGridContextMenuOpenedListener(event -> {
 
           if (event.isOpened()) {
   		
               GridContextMenu<Tenant> menu = event.getSource();
   			
               menu.removeAll();
   			
               event.getItem().ifPresent(entity -> {
   			
                   menu.addItem("a1111", e -> System.out.println("a1111" + entity));
   				
                   menu.addItem("a2222", e -> System.out.println("a2222" + entity));
   				
                   menu.addItem("a3333", e -> System.out.println("a3333" + entity));
   				
                   menu.addItem("a4444", e -> System.out.println("a4444" + entity));
   				
               });
   			
           }
   		
       });

But the listener parts, such as System.out.println(…) cannot working when clicked that menu items whatever whats method for my tried, but no use. the console always black. Dose I wrong?
Thanks

now i changed my code and successfully working. but whats difference, bug or not bug?

![kill problem code]
(https://bbkki.com/d/img/1343b1c.png)


    public CrudGridView<T> buildMenu(BiConsumer<GridContextMenu<T>, T> consumer) {
        GridContextMenu<T> menu = grid.addContextMenu();
        menu.setDynamicContentHandler(entity -> {
            if(entity == null) {
                return false;
            }
            menu.removeAll();
            grid.select(entity);
            // many for menu.addItems("names", clickListeners)
            consumer.accept(menu,entity);
            return true;
        });

        /*above code can let click listeners working.*/
        /* below code can add item to client page,
         * but can not let click listeners working.
         * (no any response after clicked menu items)
         */
        menu.addGridContextMenuOpenedListener(event -> {
            if (event.isFromClient() && event.isOpened()) {
                event.getSource().removeAll();
                event.getSource().getStyle().set("font-size", "12px");
                event.getItem().ifPresent(t -> {
                    grid.select(t);
                    // many for menu.addItems("names", clickListeners)
                    consumer.accept(event.getSource(), t);
                });
            }
        });

        return this;
    }