[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();
               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?

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

![kill problem code]

    public CrudGridView<T> buildMenu(BiConsumer<GridContextMenu<T>, T> consumer) {
        GridContextMenu<T> menu = grid.addContextMenu();
        menu.setDynamicContentHandler(entity -> {
            if(entity == null) {
                return false;
            // many for menu.addItems("names", clickListeners)
            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().getStyle().set("font-size", "12px");
                event.getItem().ifPresent(t -> {
                    // many for menu.addItems("names", clickListeners)
                    consumer.accept(event.getSource(), t);

        return this;